Skip to content

Conversation

@mifu67
Copy link
Contributor

@mifu67 mifu67 commented Oct 24, 2025

Merging/unmerging issues is only relevant to error issues. Open periods are not relevant to error issues.

@mifu67 mifu67 requested a review from a team October 24, 2025 22:36
@mifu67 mifu67 requested a review from a team as a code owner October 24, 2025 22:36
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2025
Comment on lines 202 to 207
destination = Group.objects.get(id=destination_id)
destination.update(**get_group_backfill_attributes(caches, destination, events))

update_open_periods(source, destination)
logger.info("migrate_events.migrate", extra={**extra, "destination_id": destination_id})

if isinstance(args, InitialUnmergeArgs) or opt_eventstream_state is None:
Copy link

Choose a reason for hiding this comment

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

Bug: Removing update_open_periods during error group unmerge causes destination groups to retain inconsistent open period data.
Severity: MEDIUM | Confidence: 0.90

🔍 Detailed Analysis

When two error groups are unmerged, the removal of the update_open_periods function prevents the destination group's open period data from being synchronized with the source group's data. This occurs because ErrorGroupType issues typically have open periods created by default. Consequently, the destination group retains stale or inconsistent open period information, which could affect workflow decisions or queries relying on this data.

💡 Suggested Fix

Reintroduce the call to update_open_periods or implement equivalent logic to synchronize open period data for the destination group during error group unmerge operations.

🤖 Prompt for AI Agent
Fix this bug. In src/sentry/tasks/unmerge.py at lines 202-207: When two error groups are
unmerged, the removal of the `update_open_periods` function prevents the destination
group's open period data from being synchronized with the source group's data. This
occurs because `ErrorGroupType` issues typically have open periods created by default.
Consequently, the destination group retains stale or inconsistent open period
information, which could affect workflow decisions or queries relying on this data.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Open period data doesn't matter for these groups. They don't use it.

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.

2 participants