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(grouping): Method to upgrade deprecated configs #74203

Merged
merged 6 commits into from
Jul 15, 2024

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Jul 12, 2024

This will allow upgrading projects with a grouping configuration marked as deprecated. The project will also get the auto updates config set to True to prevent them from falling behind.

This PR is to run the upgrades.

This will allow upgrading project with a grouping configuration that has been marked as depecrated.
The project will also get the auto updates config set to `True` to prevent them from falling behind.
@armenzg armenzg self-assigned this Jul 12, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 12, 2024
@@ -17,6 +17,17 @@

Job = MutableMapping[str, Any]

# We are moving all projects off these configuration without waiting for events
CONFIGS_TO_DEPRECATE = []
Copy link
Member Author

Choose a reason for hiding this comment

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

When we're ready, we will add the mobile config here.

src/sentry/grouping/ingest/config.py Outdated Show resolved Hide resolved
src/sentry/grouping/ingest/config.py Outdated Show resolved Hide resolved
@@ -27,7 +38,9 @@ def _project_should_update_grouping(project: Project) -> bool:
should_update_org = (
project.organization_id % 1000 < float(settings.SENTRY_GROUPING_AUTO_UPDATE_ENABLED) * 1000
)
return bool(project.get_option("sentry:grouping_auto_update")) and should_update_org
deprecated_config = project.get_option("sentry:grouping_config") in CONFIGS_TO_DEPRECATE
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 code is reached when we save an error event, thus, we will also upgrade during ingestion:

update_grouping_config_if_needed(project)

@armenzg armenzg marked this pull request as ready for review July 12, 2024 16:10
@armenzg armenzg requested a review from a team as a code owner July 12, 2024 16:10
src/sentry/grouping/ingest/config.py Outdated Show resolved Hide resolved
src/sentry/grouping/ingest/config.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.21%. Comparing base (623779a) to head (2f346d7).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #74203      +/-   ##
==========================================
+ Coverage   78.19%   78.21%   +0.01%     
==========================================
  Files        6660     6664       +4     
  Lines      297414   297562     +148     
  Branches    51184    51200      +16     
==========================================
+ Hits       232576   232731     +155     
+ Misses      58523    58519       -4     
+ Partials     6315     6312       -3     
Files Coverage Δ
src/sentry/grouping/ingest/config.py 89.83% <100.00%> (+0.94%) ⬆️

... and 33 files with indirect coverage changes

@armenzg armenzg merged commit efb8a85 into master Jul 15, 2024
49 of 50 checks passed
@armenzg armenzg deleted the feat/deprecate_mobile_config/armenzg branch July 15, 2024 17:21
armenzg added a commit that referenced this pull request Jul 22, 2024
When events come in for projects with the mobile grouping config, they
will start transitioning to the latest project config.

Once we can run the one-off script in GoCD, we can also transition
projects without any events.

This takes advantage of the feature added in #74203.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 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