ref(groupresolution): order releases by date_released when it is set - #124040
Draft
stigi wants to merge 3 commits into
Draft
ref(groupresolution): order releases by date_released when it is set#124040stigi wants to merge 3 commits into
stigi wants to merge 3 commits into
Conversation
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.
Draft, and deliberately so: this is a behaviour change rather than a pure bug fix, and I'd like direction on how you'd want it gated before it's worth polishing. Opening it mainly so #47218 has something concrete attached.
Fixes the inconsistency in #47218 (open since 2023; #9771 reported the same in 2018): the releases endpoints order by
COALESCE(date_released, date_added), butGroupResolution.has_resolutioncomparesdate_addedalone. Both are called "release order" in the UI, and they disagree.The problem
date_addedis when Sentry first saw a release, not when it shipped. A release row created by an incoming event from an old build carries a recentdate_added, so it outranks the release that actually fixed the issue, and the issue reopens.From our org today:
The regressing build shipped nine months before the fix and its
dateReleasedsays so, but the row was only created on 2026-09-02 when an old client first sent an event. The activity feed calls the reopening "based on release order".Finalizing does not help, because the resolution path never reads the field. There is no workaround either:
date_addedis not settable through the API — the release serializer ignoresdateCreated/dateAddedwhile acceptingdateReleasedin the same request.The change
One helper,
release_order_date(date_added, date_released), used at the four placeshas_resolutioncompares dates. It mirrors theCOALESCEthe releases endpoints andmost_recent_releasealready use, so both meanings of "release order" agree.Three tests cover a release added late but finalized with an earlier ship date, for
in_releaseandin_next_release, and for a resolution whose own release was late-registered.What I need direction on
date_added. Should it sit behind a feature flag or an org option rather than shipping unconditionally?most_recent_releaseand the semver paths alone.get_current_release_version_of_groupmay deserve the same treatment.create_releaseacceptsdate_released, but they are unverified. Happy to iterate if CI disagrees.Context: we hit this after backfilling
dateReleasedonto 3,301 historical releases from our CI's build manifest. It corrected the Releases list ordering and changed nothing about regressions.