Skip to content

ref(suspect-commits): GA suspect-commits-all-frames#65043

Merged
malwilley merged 4 commits intomasterfrom
malwilley/ref/ga-suspect-commits
Feb 13, 2024
Merged

ref(suspect-commits): GA suspect-commits-all-frames#65043
malwilley merged 4 commits intomasterfrom
malwilley/ref/ga-suspect-commits

Conversation

@malwilley
Copy link
Member

This feature flag has been enabled in SaaS for some time now. This PR removes the flag and all now-unused logic.

Most of the tests were already re-written for the new methods, so there are a lot of deleted tests which should not decrease coverage. Any cases that didn't look covered were modified to use the new methods.

The important changes are in tasks/commit_context.py and post_process.py

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 12, 2024

PREFERRED_GROUP_OWNERS = 1
PREFERRED_GROUP_OWNER_AGE = timedelta(days=7)
DEBOUNCE_CACHE_KEY = lambda group_id: f"process-commit-context-{group_id}"
Copy link
Member Author

@malwilley malwilley Feb 12, 2024

Choose a reason for hiding this comment

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

Removed all references to DEBOUNCE_CACHE_KEY and PREFFERRED_GROUP_OWNER*. The previous method used this to run once a week, but the new method only runs once for new issues.

for record in to_be_deleted:
record.delete()

current_owners = owners.filter(
Copy link
Member Author

Choose a reason for hiding this comment

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

No need to check for existing suspect commits anymore since this is only run once per issue

code_mappings = get_sorted_code_mapping_configs(project)

frames = event_frames or []
munged = munged_filename_and_frames(event_platform, frames, "munged_filename", sdk_name)
Copy link
Member Author

Choose a reason for hiding this comment

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

No need to call the munging function anymore since the new logic does it later on #62768

@codecov
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (326ea94) 81.41% compared to head (b3c2cae) 81.42%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #65043      +/-   ##
==========================================
+ Coverage   81.41%   81.42%   +0.01%     
==========================================
  Files        5254     5254              
  Lines      232323   232119     -204     
  Branches    45607    45564      -43     
==========================================
- Hits       189139   189006     -133     
+ Misses      37290    37243      -47     
+ Partials     5894     5870      -24     
Files Coverage Δ
src/sentry/conf/server.py 88.18% <ø> (ø)
src/sentry/features/__init__.py 100.00% <ø> (ø)
src/sentry/integrations/github/client.py 83.57% <ø> (-0.31%) ⬇️
src/sentry/integrations/github/integration.py 89.14% <ø> (+4.01%) ⬆️
...ntry/integrations/github_enterprise/integration.py 84.89% <ø> (+4.26%) ⬆️
src/sentry/integrations/gitlab/client.py 93.29% <ø> (-0.24%) ⬇️
src/sentry/integrations/gitlab/integration.py 93.66% <ø> (+4.15%) ⬆️
src/sentry/integrations/mixins/commit_context.py 90.69% <ø> (+4.98%) ⬆️
src/sentry/integrations/utils/commit_context.py 87.73% <ø> (+5.59%) ⬆️
src/sentry/tasks/commit_context.py 98.27% <100.00%> (+11.75%) ⬆️
... and 1 more

... and 6 files with indirect coverage changes

@malwilley malwilley marked this pull request as ready for review February 13, 2024 00:08
@malwilley malwilley requested review from a team as code owners February 13, 2024 00:08
@malwilley malwilley removed the request for review from a team February 13, 2024 00:09
Copy link
Member

@ceorourke ceorourke left a comment

Choose a reason for hiding this comment

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

I've never seen a more beautiful pr 😭

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.

💯

@malwilley malwilley force-pushed the malwilley/ref/ga-suspect-commits branch from 7e905ce to b3c2cae Compare February 13, 2024 17:21
@malwilley malwilley merged commit b1f0652 into master Feb 13, 2024
@malwilley malwilley deleted the malwilley/ref/ga-suspect-commits branch February 13, 2024 19:10
@github-actions github-actions bot locked and limited conversation to collaborators Feb 29, 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.

3 participants