-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(releases): Fix new groups count per project for a release #100919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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 |
@sentry review |
@sentry review |
@sentry review |
release_id: [ | ||
cast(SerializedProject, {**project_map[project_id], "newGroups": count}) | ||
for project_id, count in mapping.items() | ||
] |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
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.