Skip to content

Conversation

srest2021
Copy link
Member

@srest2021 srest2021 commented Oct 3, 2025

Originally, the number of new groups per project for a certain release was incorrect - it showed the same number for all projects in a release. This is because we were using the per-project new groups count (ie, release.projects[x].newGroups), which was incorrectly returning the sum of all new group counts across all releases for that project.

In #99555 we switched to using release.newGroups. But this also incorrectly returns the total number of new issues across all projects for that release.

Here we fix the underlying issue with release.projects[x].newGroups by setting it to the new groups count for that release in that project. This fix only applies to the new serializer.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 3, 2025
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #100919      +/-   ##
===========================================
+ Coverage   80.69%    81.19%   +0.50%     
===========================================
  Files        8626      8622       -4     
  Lines      382662    382563      -99     
  Branches    24036     24023      -13     
===========================================
+ Hits       308774    310630    +1856     
+ Misses      73556     71607    -1949     
+ Partials      332       326       -6     

@srest2021
Copy link
Member Author

@sentry review

@srest2021 srest2021 changed the title fix projects[x].newgroups fix(releases): Fix new groups count per project for a release Oct 3, 2025
@srest2021
Copy link
Member Author

@sentry review

@srest2021
Copy link
Member Author

@sentry review

@srest2021 srest2021 marked this pull request as ready for review October 4, 2025 00:33
release_id: [
cast(SerializedProject, {**project_map[project_id], "newGroups": count})
for project_id, count in mapping.items()
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Project List Incomplete and KeyError Risk

The release_projects_map is built by iterating over new_groups_map, which can cause projects without new groups to be omitted from the release's project list. This also introduces a KeyError risk if new_groups_map contains a project ID not found in the main project_map.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not totally certain how this behavior differs from the old behavior

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.

1 participant