Draft: Revert "Organization contains namespaces"
What does this MR do and why?
Organization contains namespaces (!120822 - merged) caused a deployment problem. We are reverting the MR to avoid chance of deployment problems for self managed customers.
Further to the MR revert
- Remove the
namespaces.organization_id
column if it exists - No longer track Organization record deletions
-
unprepare_async_index
thenamespaces.organization_id
index
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #412771 (closed)
Merge request reports
Activity
changed milestone to %16.1
added database devopsdata stores grouptenant scale sectioncore platform typefeature + 1 deleted label
assigned to @alexpooley
added docs-only label
added 14 commits
-
e73b540d...b65983f2 - 12 commits from branch
master
- f10e87f4 - Revert "Merge branch '394796-organization-model-contains-groups' into 'master'"
- 0561cf3f - Revert organization contains namespaces
-
e73b540d...b65983f2 - 12 commits from branch
- A deleted user
added backend databasereview pending labels
1 Message This merge request adds or changes files that require a review from the Database team. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
-
Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
-
Prepare your MR for database review according to the docs.
-
Assign and mention the database reviewer suggested by Reviewer Roulette.
-
Kick off the
db:gitlabcom-database-testing
manual job. This job can also be used before requesting review to test your migrations against production data.
The following files require a review from the Database team:
db/post_migrate/20230524030256_remove_organization_id_on_namespaces.rb
db/schema_migrations/20230524025949
db/schema_migrations/20230524030119
db/schema_migrations/20230524030256
db/structure.sql
db/migrate/20230524025949_remove_org_id_index_on_namespaces.rb
db/migrate/20230524030119_remove_track_org_record_changes.rb
Notification to the Data Team about changes to files with possible impact on Data Warehouse, add label
Data Warehouse::Impact Check
.The following files require a review:
db/structure.sql
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Aaron Huntsman (
@ahuntsman
) (UTC-5, 13 hours behind@alexpooley
)Allen Cook (
@acook.gitlab
) (UTC-4, 12 hours behind@alexpooley
)database Prabakaran Murugesan (
@praba.m7n
) (UTC+2, 6 hours behind@alexpooley
)João Alexandre Prado Tavares Cunha (
@Alexand
) (UTC+0, 8 hours behind@alexpooley
)~"migration" No reviewer available No maintainer available To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
- A deleted user
added Data WarehouseImpact Check label
removed docs-only label
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 0561cf3fexpand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Create | 8 | 0 | 1 | 0 | 9 | ✅ | | Govern | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Data Stores | 2 | 0 | 0 | 0 | 2 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 21 | 0 | 2 | 0 | 23 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
1 # frozen_string_literal: true 2 3 class RemoveOrganizationIdOnNamespaces < Gitlab::Database::Migration[2.1] 4 DEFAULT_ORGANIZATION_ID = 1 5 6 enable_lock_retries! 7 8 def up 9 remove_column :namespaces, :organization_id, if_exists: true @alexpooley if this is deployed before the fix from @tkuah, then it will cause the same problem again, right?
Yeah, you are right @OmarQunsulGitlab. Great catch !
- The cached column list will contain
organization_id
-
SELECT *
will not containorganization_id
Edited by Thong Kuah- The cached column list will contain
@OmarQunsulGitlab @tkuah I created this MR just in case we need it. I'd rather have the fix merged
I will work on !121613 (merged). It should at least fix things enough until we need to add
ignored_column
to Namesapce
mentioned in issue #412771 (closed)
Closing this MR in favor of !122809 (merged)
mentioned in merge request !122809 (merged)