fix(releases): Prevent false positive regressions when follows_semver flips after resolution#111584
Merged
rodolfoBee merged 1 commit intomasterfrom Mar 26, 2026
Conversation
| res_release_raw = parse_release( | ||
| res_release_version, json_loads=orjson.loads | ||
| ).get("version_raw") | ||
| return compare_version_relay(res_release_raw, release_raw) == 1 |
Contributor
There was a problem hiding this comment.
Bug: The fallback version comparison == 1 incorrectly excludes cases where the event release is the same as the resolved-in release for in_next_release resolutions.
Severity: MEDIUM
Suggested Fix
Change the comparison at line 147 to return compare_version_relay(res_release_raw, release_raw) >= 0 or != -1. This will correctly handle the case where the event release is equal to the resolved-in release, marking the resolution as valid.
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/models/groupresolution.py#L147
Potential issue: In the fallback logic for `in_next_release` resolutions, the version
comparison `compare_version_relay(res_release_raw, release_raw) == 1` is used. This
check only returns true if the resolved-in release is strictly greater than the event's
release. It incorrectly returns `False` (indicating a regression) when an event's
release version is the same as the release the issue was resolved in. This bug is
triggered when the `current_release_version` is stale, `follows_semver` is true, and the
event release version exactly matches the resolution release version.
Did we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment.
This is intentional:
resolved_in_release>event_release-> NO regressionresolved_in_release<=event_release-> regression
scttcper
approved these changes
Mar 25, 2026
Member
scttcper
left a comment
There was a problem hiding this comment.
looks good, i'd probably also tell that user to make sure their releases are all semver if they want our semver features to work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111393.
When
has_resolution()determines thatcurrent_release_versionis older than the event's release (semver), also check whether the event's release is older than the resolved-in release before declaring regression.Fixes false positive regressions when
follows_semverflips from False to True between resolution time & event arrival time.