Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:workflow-engine-issue-alert-endpoints-put", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable metric detector limits by plan type
manager.add("organizations:workflow-engine-metric-detector-limit", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable seer activities to be evaluated in workflow engine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Flag removal disables seer paths

Medium Severity

Removing registration for organizations:workflow-engine-evaluate-seer-activities while production code still gates seer-activity workflow handling, notifications, and the data-condition index on features.has for that name makes those checks always evaluate false once the flag is unregistered. Tests that enable the flag via Feature or with_feature also fail because the test helper requires a registered feature.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d2f7264. Configure here.

manager.add("organizations:workflow-engine-evaluate-seer-activities", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable our logs product (known internally as ourlogs) in UI and backend

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The feature flag organizations:workflow-engine-evaluate-seer-activities is being de-registered while still being used in multiple production code paths, which will cause silent functional regressions.
Severity: HIGH

Suggested Fix

Ensure that the dependent pull request which removes all usages of the organizations:workflow-engine-evaluate-seer-activities feature flag is merged before this pull request. This will prevent a state where the flag is de-registered but still referenced in active code.

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/features/temporary.py#L402

Potential issue: This pull request removes the registration for the feature flag
`organizations:workflow-engine-evaluate-seer-activities`. However, this flag is still
actively used in four production code paths. The `features.has()` check for an
unregistered flag will silently return `False` instead of raising an error. This will
cause silent functional regressions by disabling Seer activity processing across all
dependent code paths, such as skipping seer activity handlers, falling back to different
notification logic, and filtering out `SEER_ACTIVITY_TRIGGER` conditions from API
results.

Also affects:

  • src/sentry/workflow_engine/handlers/workflow/workflow_activity_handlers.py:63
  • src/sentry/notifications/notification_action/utils.py:59
  • src/sentry/notifications/notification_action/action_handler_registry/webhook_handler.py:66
  • src/sentry/workflow_engine/endpoints/organization_data_condition_index.py:71

Did we get this right? 👍 / 👎 to inform future reviews.

manager.add("organizations:ourlogs-enabled", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable our logs product to be ingested via Relay.
Expand Down
Loading