-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(data-secrecy): Migration to Add Bit Flags to Hybrid Cloud Services #74891
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
Conversation
|
This PR has a migration; here is the generated SQL for --
-- Custom state/database change combination
--
ALTER TABLE "sentry_organizationmapping"
ADD COLUMN "disable_member_project_creation" boolean NOT NULL DEFAULT false,
ADD COLUMN "prevent_superuser_access" boolean NOT NULL DEFAULT false; |
wedamija
left a comment
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.
Migration lgtm
could i pytest.skip the failing tests? i think they are happening because the function i updated expects my migration's columns to exist. |
Yeah, it's fine to skip migration tests |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #74891 +/- ##
===========================================
+ Coverage 57.10% 78.17% +21.07%
===========================================
Files 6728 6742 +14
Lines 300098 300868 +770
Branches 51618 51737 +119
===========================================
+ Hits 171376 235210 +63834
+ Misses 123944 59319 -64625
- Partials 4778 6339 +1561
|
markstory
left a comment
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.
Looks safe to deploy to me. As regions are updated, they will start sending the new flag keys, and once control updates the flag state will start being updated. On the read side, the default values in RpcOrganizationMappingFlags will the columns in.
| sort="date", | ||
| ) | ||
|
|
||
| @pytest.mark.skip(reason="old migration test") |
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.
If these tests don't work anymore, why not delete them?
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 think it's helpful to keep some around as an example, but we could delete old skipped tests after a while
…es (#74891) I recently merged a [migration](#74700) to add `prevent_superuser_access` to the Organization bitflag and now need to add it to Hybrid Cloud services to sync since I need it to exist on `RpcOrganization`. In this PR, I also add the `disable_member_project_creation` flag since it existed above the new flag I created. My flag is still not used in our logic, but the `disable_member_project_creation` is currently being used, so we need to make sure this pr doesn't mess around with its value.
I recently merged a migration to add
prevent_superuser_accessto the Organization bitflag and now need to add it to Hybrid Cloud services to sync since I need it to exist onRpcOrganization.In this PR, I also add the
disable_member_project_creationflag since it existed above the new flag I created.My flag is still not used in our logic, but the
disable_member_project_creationis currently being used, so we need to make sure this pr doesn't mess around with its value.