Skip to content
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

feat(issues): adds backend for "resolve in upcoming release" #70990

Merged
merged 10 commits into from
Jun 18, 2024

Conversation

roggenkemper
Copy link
Member

this pr adds the backend needed to support "resolve in upcoming release" to the ProjectGroupIndex endpoint. this differs from "resolve in next release" because it no longer does the check for if there is an immediate next release to the current release of the issue. It will still create the GroupResolution object which will eventually be cleared in clear_expired_resolutions but this will now be the only way for it to be resolved, only when a new release is created.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 15, 2024
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.10%. Comparing base (2d7dcff) to head (5ed0193).
Report is 1488 commits behind head on master.

Current head 5ed0193 differs from pull request most recent head e74c9d5

Please upload reports for the commit e74c9d5 to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #70990       +/-   ##
===========================================
+ Coverage   61.14%   78.10%   +16.96%     
===========================================
  Files        6508     6550       +42     
  Lines      289997   292399     +2402     
  Branches    50196    50479      +283     
===========================================
+ Hits       177310   228392    +51082     
+ Misses     106913    57665    -49248     
- Partials     5774     6342      +568     
Files Coverage Δ
...i/helpers/group_index/validators/status_details.py 84.61% <100.00%> (+36.33%) ⬆️
src/sentry/models/groupresolution.py 98.52% <100.00%> (+47.78%) ⬆️
src/sentry/tasks/clear_expired_resolutions.py 82.60% <ø> (+8.69%) ⬆️
src/sentry/api/helpers/group_index/update.py 90.05% <76.92%> (+25.16%) ⬆️

... and 1947 files with indirect coverage changes

Comment on lines +313 to +315
)
.extra(select={"sort": "COALESCE(date_released, date_added)"})
.order_by("-sort")[0]
Copy link
Member

@JoshFerge JoshFerge Jun 17, 2024

Choose a reason for hiding this comment

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

what does this mean semantically, and is this still the correct behavior for "resolve in upcoming release"? (the case where there is no release passed in.)

Copy link
Member Author

Choose a reason for hiding this comment

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

this query is used in a couple places to find the most recent release for a project, which we still need for this because in clear_expired_resolutions we compare the newly created release and check if there are any GroupResolution objects that have a release for a matching project that is older. if there is, then we know a new release for that project is created, so we can clear the pending GroupResolution and say the Group is resolved.

Copy link
Member

Choose a reason for hiding this comment

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

got it

Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

overall looks good, one Q about sort ordering, and a few more tests would be useful. great work!

Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

one final q about error detail text but lgtm

@roggenkemper roggenkemper enabled auto-merge (squash) June 18, 2024 16:26
@roggenkemper roggenkemper merged commit 43c6e3c into master Jun 18, 2024
48 checks passed
@roggenkemper roggenkemper deleted the roggenkemper/resolveupcomingreleasev0 branch June 18, 2024 16:42
roggenkemper added a commit that referenced this pull request Jun 18, 2024
this pr makes the front end changes to support resolve in upcoming
release. backend changes in
#70990. the changes made include
adding an option to the Resolve button on issue details (hidden behind a
feature flag), adding a subtitle to the resolve dropdown to clarify
behavior, and updating the resolution box to support this form of
resolution. the group activities item shouldn't need any updates as it
mirrors the behavior as "resolve in next release"
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants