-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
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.
src/sentry/grouping/ingest/config.py
Outdated
@@ -17,6 +17,17 @@ | |||
|
|||
Job = MutableMapping[str, Any] | |||
|
|||
# We are moving all projects off these configuration without waiting for events | |||
CONFIGS_TO_DEPRECATE = [] |
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.
When we're ready, we will add the mobile config here.
src/sentry/grouping/ingest/config.py
Outdated
@@ -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 |
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.
This code is reached when we save an error event, thus, we will also upgrade during ingestion:
sentry/src/sentry/event_manager.py
Line 1400 in 233ccd6
update_grouping_config_if_needed(project) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
|
Co-authored-by: Katie Byers <[email protected]>
Co-authored-by: Katie Byers <[email protected]>
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.
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.