Skip to content

fix(releases): Merge first and last seen across projects - #127848

Closed
joshuarli wants to merge 1 commit into
masterfrom
fix/release-first-last-seen-merge
Closed

joshuarli wants to merge 1 commit into
masterfrom
fix/release-first-last-seen-merge

Conversation

@joshuarli

Copy link
Copy Markdown
Member

get_release_project_first_last_seen builds first_seen/last_seen keyed by release id, but the merge loop looked up the existing value with tv.value, which is the release version string. The lookup always returned None, so the min/max merge never ran. Release tags are grouped by project and version, so a release seen in several projects produced several tag values, and the last one overwrote the others. The firstEvent/lastEvent fields in release responses could then show one project's timestamps instead of the earliest and latest across the requested projects.

The loop now resolves the release id first and reads and writes the maps with it. The docstring said the keys were release versions; it now says release ids.

Only the no-environment path is affected. The environment path uses a different function.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 16, 2026
@getsantry getsantry Bot added the Stale label Nov 7, 2026
@getsantry

getsantry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

get_release_project_first_last_seen looked up the existing value with the release version while the maps are keyed by release id, so the lookup always missed and min/max never ran. With a release seen in several projects, the last tag value overwrote the others, giving wrong firstEvent and lastEvent. Look up by release id instead.
@joshuarli

Copy link
Copy Markdown
Member Author

Consolidated into #130965 as part of the typing campaign cleanup; code unchanged from the individually validated draft. Tracked in #130956.

@joshuarli joshuarli closed this Nov 12, 2026
joshuarli added a commit that referenced this pull request Nov 26, 2026
Consolidates the previously separate drafts #127798, #127848, #129618
and #129620 into one review unit; the code is unchanged from those
individually validated drafts.

- accept an empty owner in the release serializer
- merge first and last seen timestamps across projects using the release id
- default healthData.stats to {} and per-project newGroups to 0 so the
  response always matches the documented shape
- require artifact index manifests and their files mapping to be JSON
  objects before use

Integrated in #130956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Team: python-typing Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant