Skip to content

Commit a637e41

Browse files
ceorourkegeorge-sentry
authored andcommitted
chore(ACI): Add a flag to incident details GET method (#112230)
We're ready to roll out the metric alert and incident GET methods so this PR puts a flag around the incident details GET method to use the backwards compatible serializer.
1 parent 43360b1 commit a637e41

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/sentry/features/temporary.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ def register_temporary_features(manager: FeatureManager) -> None:
447447
# Use workflow engine exclusively for OrganizationCombinedRuleIndexEndpoint.get results.
448448
# See src/sentry/workflow_engine/docs/legacy_backport.md for context.
449449
manager.add("organizations:workflow-engine-combinedruleindex-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
450+
# Use workflow engine exclusively for OrganizationIncidentDetailsEndpoint.get results.
451+
# See src/sentry/workflow_engine/docs/legacy_backport.md for context.
452+
manager.add("organizations:workflow-engine-orgincidentdetails-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
450453
# Use workflow engine exclusively for legacy issue alert rule.get results.
451454
# See src/sentry/workflow_engine/docs/legacy_backport.md for context.
452455
manager.add("organizations:workflow-engine-issue-alert-endpoints-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)

src/sentry/incidents/endpoints/organization_incident_details.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ def convert_args(
7272
if not features.has("organizations:incidents", organization, actor=request.user):
7373
raise ResourceDoesNotExist
7474

75-
if request.method == "GET" and features.has(
76-
"organizations:workflow-engine-rule-serializers", organization
77-
):
75+
has_workflow_engine_flags = features.has(
76+
"organizations:workflow-engine-orgincidentdetails-get", organization
77+
) or features.has("organizations:workflow-engine-rule-serializers", organization)
78+
79+
if request.method == "GET" and has_workflow_engine_flags:
7880
gop: GroupOpenPeriod | None = None
7981

8082
# Try the association table first (dual-written data).

0 commit comments

Comments
 (0)