Skip to content

Conversation

@mifu67
Copy link
Contributor

@mifu67 mifu67 commented Nov 12, 2025

We want to take a different approach with links, so undo consolidation of the links flag with the ui rollout for now.

@mifu67 mifu67 requested a review from a team November 12, 2025 18:05
@mifu67 mifu67 requested review from a team as code owners November 12, 2025 18:05
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2025
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/incidents/action_handlers.py 0.00% 2 Missing ⚠️
src/sentry/integrations/metric_alerts.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           master   #103241       +/-   ##
============================================
+ Coverage   69.26%    80.71%   +11.44%     
============================================
  Files        9220      9226        +6     
  Lines      393584    393961      +377     
  Branches    25094     25094               
============================================
+ Hits       272604    317970    +45366     
+ Misses     120532     75543    -44989     
  Partials      448       448               

Comment on lines 253 to 259

title_link = build_title_link(alert_rule_id, organization, workflow_engine_params)

elif features.has("organizations:workflow-engine-ui", organization):
elif features.has("organizations:workflow-engine-ui-links", organization):
if metric_issue_context.group is None:
raise ValueError("Group is required for workflow engine UI links")

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's something different

Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

lgtm, i tried to match up to the other PR and didn't notice anything.

Comment on lines 253 to 259

title_link = build_title_link(alert_rule_id, organization, workflow_engine_params)

elif features.has("organizations:workflow-engine-ui", organization):
elif features.has("organizations:workflow-engine-ui-links", organization):
if metric_issue_context.group is None:
raise ValueError("Group is required for workflow engine UI links")

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this not the same comment as before? Bad bot.

@mifu67 mifu67 merged commit 5421b9e into master Nov 12, 2025
71 of 73 checks passed
@mifu67 mifu67 deleted the mifu67/aci/revert-consolidate-links-flag branch November 12, 2025 18:30
Comment on lines 92 to 98
if notification_uuid:
group_params["notification_uuid"] = notification_uuid
rule_workflow_context = {}
if features.has("organizations:workflow-engine-ui", group.project.organization):
if features.has("organizations:workflow-engine-ui-links", group.project.organization):
workflow_urls = self._get_workflow_urls(group, rules)
rule_workflow_context = {
"Triggering Workflows": ", ".join([rule.label for rule in rules]),
Copy link

Choose a reason for hiding this comment

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

Bug: MetricIssue.build_visible_feature_name() uses an outdated feature flag, causing inconsistent visibility.
Severity: HIGH | Confidence: 0.95

🔍 Detailed Analysis

The MetricIssue.build_visible_feature_name() method incorrectly returns the old feature flag "organizations:workflow-engine-ui". This conflicts with other functional code in the pull request that has been updated to check the new feature flag "organizations:workflow-engine-ui-links" for generating workflow links. This mismatch leads to inconsistent behavior where MetricIssue group types might not be visible even if workflow links are generated, violating the intended separation of concerns.

💡 Suggested Fix

Update MetricIssue.build_visible_feature_name() in src/sentry/incidents/grouptype.py to return "organizations:workflow-engine-ui-links".

🤖 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/integrations/opsgenie/client.py#L92-L98

Potential issue: The `MetricIssue.build_visible_feature_name()` method incorrectly
returns the old feature flag `"organizations:workflow-engine-ui"`. This conflicts with
other functional code in the pull request that has been updated to check the new feature
flag `"organizations:workflow-engine-ui-links"` for generating workflow links. This
mismatch leads to inconsistent behavior where `MetricIssue` group types might not be
visible even if workflow links are generated, violating the intended separation of
concerns.

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

Reference_id: 2620863

andrewshie-sentry pushed a commit that referenced this pull request Nov 13, 2025
We want to take a different approach with links, so undo consolidation
of the links flag with the ui rollout for now.
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.

3 participants