Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tempest): add audit log events for tempest client ids #83091

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

constantinius
Copy link
Contributor

Add audit log events TEMPEST_CLIENT_ID_ADD/TEMPEST_CLIENT_ID_REMOVE for when tempes client ids are created/deleted.

Closes https://github.com/getsentry/team-gdx/issues/56

Add audit log events TEMPEST_CLIENT_ID_ADD/TEMPEST_CLIENT_ID_REMOVE for when tempes client ids are created/deleted.
@constantinius constantinius requested a review from a team as a code owner January 8, 2025 14:13
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 8, 2025
@constantinius constantinius requested a review from a team January 8, 2025 14:14
Copy link
Member

@shellmayr shellmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add some tests on this to ensure the end-to-end system works as intended, here's an example from a previous PR that tested audit log creation:

#74058

Copy link

codecov bot commented Jan 8, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
23479 2 23477 221
View the top 2 failed tests by shortest run time
tests.sentry.tempest.endpoints.test_tempest_credentials.TestTempestCredentials::test_create_tempest_credentials
Stack Traces | 0.079s run time
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/unittest/mock.py#x1B[0m:1390: in patched
    with self.decoration_helper(patched,
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/contextlib.py#x1B[0m:137: in __enter__
    return next(self.gen)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/unittest/mock.py#x1B[0m:1372: in decoration_helper
    arg = exit_stack.enter_context(patching)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/contextlib.py#x1B[0m:526: in enter_context
    result = _enter(cm)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/unittest/mock.py#x1B[0m:1445: in __enter__
    self.target = self.getter()
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6................../x64/lib/python3.12/pkgutil.py#x1B[0m:528: in resolve_name
    result = getattr(result, p)
#x1B[1m#x1B[31mE   AttributeError: module 'sentry.tempest.endpoints.tempest_credentials' has no attribute 'TempestCredentialsDetailsEndpoint'. Did you mean: 'TempestCredentialsEndpoint'?#x1B[0m
tests.sentry.tempest.endpoints.test_tempest_credentials_details.TestTempestCredentialsDetails::test_delete_tempest_credentials_as_org_admin
Stack Traces | 2.95s run time
#x1B[1m#x1B[.../tempest/endpoints/test_tempest_credentials_details.py#x1B[0m:47: in test_delete_tempest_credentials_as_org_admin
    assert response.status_code == 204
#x1B[1m#x1B[31mE   assert 500 == 204#x1B[0m
#x1B[1m#x1B[31mE    +  where 500 = <Response status_code=500, "application/json">.status_code#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants