Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: New feature flag not registered in feature registry
- Added
organizations:workflow-engine-orgincidentindex-gettosrc/sentry/features/temporary.pywith the same FLAGPOLE andapi_expose=Falseconfiguration used by neighboring workflow-engine endpoint flags.
- Added
Or push these changes by commenting:
@cursor push f51b1b3b18
Preview (f51b1b3b18)
diff --git a/src/sentry/features/temporary.py b/src/sentry/features/temporary.py
--- a/src/sentry/features/temporary.py
+++ b/src/sentry/features/temporary.py
@@ -452,6 +452,9 @@
# Use workflow engine exclusively for OrganizationCombinedRuleIndexEndpoint.get results.
# See src/sentry/workflow_engine/docs/legacy_backport.md for context.
manager.add("organizations:workflow-engine-combinedruleindex-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
+ # Use workflow engine exclusively for OrganizationIncidentIndexEndpoint.get results.
+ # See src/sentry/workflow_engine/docs/legacy_backport.md for context.
+ manager.add("organizations:workflow-engine-orgincidentindex-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Use workflow engine exclusively for OrganizationIncidentDetailsEndpoint.get results.
# See src/sentry/workflow_engine/docs/legacy_backport.md for context.
manager.add("organizations:workflow-engine-orgincidentdetails-get", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d448834. Configure here.
| use_workflow_engine = features.has( | ||
| "organizations:workflow-engine-rule-serializers", organization | ||
| ) | ||
| ) or features.has("organizations:workflow-engine-orgincidentindex-get", organization) |
There was a problem hiding this comment.
Bug: The feature flag organizations:workflow-engine-orgincidentindex-get is used without being registered, causing features.has() to always return False and making the flag non-functional.
Severity: MEDIUM
Suggested Fix
Register the feature flag organizations:workflow-engine-orgincidentindex-get in the feature flag definitions, likely in src/sentry/features/temporary.py, to match the pattern used by other similar workflow engine flags.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/sentry/incidents/endpoints/organization_incident_index.py#L84
Potential issue: The feature flag `organizations:workflow-engine-orgincidentindex-get`
is used in the code but has not been registered. The `features.has()` method is designed
to handle unregistered flags by catching a `FeatureNotRegistered` exception and silently
returning `False`. Consequently, the check for this flag will always fail, and the new
per-endpoint flag will be non-functional. This prevents the intended independent rollout
of the workflow engine for this specific endpoint, as the code path can never be
activated via this new flag.
Did we get this right? 👍 / 👎 to inform future reviews.
d448834 to
78c52f8
Compare


No description provided.