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(aci): add GET DataConditions endpoint #87111

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

Conversation

ameliahsu
Copy link
Member

@ameliahsu ameliahsu commented Mar 14, 2025

add GET DataConditions endpoint /organization/:id_or_slug/data_conditions/

must specify a type in the request to filter the results by workflow_trigger, action_filter, or detector_trigger

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 14, 2025
Copy link

codecov bot commented Mar 14, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
24421 3 24418 300
View the top 3 failed test(s) by shortest run time
tests.sentry.api.endpoints.test_organization_spans_fields_stats.OrganizationSpansFieldsStatsEndpointTest::test_filter_query
Stack Traces | 3.48s run time
#x1B[1m#x1B[.../api/endpoints/test_organization_spans_fields_stats.py#x1B[0m:157: in test_filter_query
    assert distributions[0]["attributeName"] == "broswer"
#x1B[1m#x1B[31mE   AssertionError: assert 'sentry.transaction' == 'broswer'#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     - broswer#x1B[0m
#x1B[1m#x1B[31mE     + sentry.transaction#x1B[0m
tests.sentry.api.endpoints.test_organization_spans_fields_stats.OrganizationSpansFieldsStatsEndpointTest::test_max_buckets
Stack Traces | 4s run time
#x1B[1m#x1B[.../api/endpoints/test_organization_spans_fields_stats.py#x1B[0m:117: in test_max_buckets
    assert len(distributions) == max_buckets - 1
#x1B[1m#x1B[31mE   AssertionError: assert 1 == (3 - 1)#x1B[0m
#x1B[1m#x1B[31mE    +  where 1 = len([{'label': 'foo', 'value': 3.0}])#x1B[0m
tests.sentry.api.endpoints.test_organization_spans_fields_stats.OrganizationSpansFieldsStatsEndpointTest::test_distribution_values
Stack Traces | 5.29s run time
#x1B[1m#x1B[.../api/endpoints/test_organization_spans_fields_stats.py#x1B[0m:134: in test_distribution_values
    assert distributions[0]["attributeName"] == "broswer"
#x1B[1m#x1B[31mE   AssertionError: assert 'sentry.transaction' == 'broswer'#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     - broswer#x1B[0m
#x1B[1m#x1B[31mE     + sentry.transaction#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@ameliahsu ameliahsu force-pushed the mia/aci/data-conditions-endpoint branch from 0ea16df to 9839f89 Compare March 14, 2025 21:37
@ameliahsu ameliahsu marked this pull request as ready for review March 14, 2025 21:38
@ameliahsu ameliahsu requested a review from a team as a code owner March 14, 2025 21:38
@ameliahsu ameliahsu marked this pull request as draft March 17, 2025 21:56
@ameliahsu ameliahsu force-pushed the mia/aci/data-conditions-endpoint branch from 1c56a1b to a7d955c Compare March 17, 2025 23:24
@ameliahsu ameliahsu changed the base branch from master to mia/dc-handlers/rename March 17, 2025 23:24
@ameliahsu ameliahsu marked this pull request as ready for review March 17, 2025 23:25
Comment on lines 17 to 22
self.registry = Registry[DataConditionHandler](enable_reverse_lookup=False)
self.registry_patcher = patch(
"sentry.workflow_engine.registry.condition_handler_registry",
new=self.registry,
)
self.registry_patcher.start()
Copy link
Member Author

Choose a reason for hiding this comment

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

I mock the registry here, but this only appears to be working when I run the tests locally (test_group_filter fails in CI) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ameliahsu ameliahsu marked this pull request as draft March 18, 2025 18:11
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 18, 2025
@ameliahsu ameliahsu force-pushed the mia/aci/data-conditions-endpoint branch from 853776b to b1042ce Compare March 18, 2025 18:12
@getsentry getsentry deleted a comment from github-actions bot Mar 18, 2025
@ameliahsu ameliahsu force-pushed the mia/aci/data-conditions-endpoint branch from b1042ce to c174d72 Compare March 18, 2025 18:15
@ameliahsu ameliahsu force-pushed the mia/dc-handlers/rename branch from 0701e49 to f5fff15 Compare March 18, 2025 18:17
@getsentry getsentry deleted a comment from github-actions bot Mar 18, 2025
@iamrajjoshi iamrajjoshi removed the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 18, 2025
@ameliahsu ameliahsu requested a review from a team March 18, 2025 18:57
Base automatically changed from mia/dc-handlers/rename to master March 18, 2025 22:09
@ameliahsu ameliahsu marked this pull request as ready for review March 18, 2025 22:13
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.

4 participants