Organizations API - Delayed group deletion
What does this MR do and why?
Modeled heavily from: !147949 (merged)
Part of #442810 (closed)
Supports FE MR: !148701 (merged)
Important: This change is behind a feature flag ui_for_organizations
This change makes the necessary API changes to support the Frontend for delayed group deletion in Organizations (WIP). The intention is to utilize the logic currently found in our RESTful Groups API
By itself this change doesn't do much besides expose new data to the GraphQL endpoint and update the mock group data.
CE Environments
Pending deletion is an EE only feature and thus will also return false/nil
data for anything related to pending deletion.
EE Environments
-
isAdjournedDeletionEnabled
is enabled by default on all Groups. -
permanent_deletion_date
is the date, X days in the future, that is configured by the instance for when the group will be deleted if it is triggered now. -
marked_for_deletion_on
is the date when the deletion was triggered.
Screenshots or screen recordings
CE API Res | EE API Res |
---|---|
![]() |
![]() |
How to set up and validate locally
Setup Organizations
important: You only need to do this in your GDK if you haven't yet!
- Access
rails c
- Enable Feature Flag
Feature.enable(:ui_for_organizations)
- Create the default organization and add root to it
you = User.find_by_username('root')
default_organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization_id: default_organization.id, user_id: you.id)
-
Create a test group
-
Navigate to the GDK home page
ex: 127.0.0.1:3000/
-
Click Organizations in the sidebar
-
Click the Default Organization
-
Click the Manage > Groups and projects in the sidebar
-
Switch list to Groups in the dropdown
-
Check API response from GraphQL for your group
-
Ensure
isAdjournedDeletionEnabled
is true andpermanentDeletionDate
is a date one week out for your group. -
Click the ... for the group you made
-
Follow prompts to trigger deletion and then refresh the page
-
Ensure your group has label pending deletion
-
Ensure the API response in GraphQL for your group now has a value in
markedForDeletionOn
of today.
Related to #442810 (closed)
Merge request reports
Activity
changed milestone to %16.11
added Category:Groups & Projects Category:Organization Core-Platform-FE Enterprise Edition GraphQL api backend devopsdata stores documentation featureaddition frontend grouptenant scale milestonep1 pipeline:run-all-jest pipeline:run-all-rspec pipeline:run-as-if-foss sectioncore platform typefeature labels
assigned to @zcuddy
1 Warning This merge request changed files with disabled eslint rules. Please consider fixing them. 2 Messages CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/api/graphql/reference/index.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Disabled eslint rules
The following files have disabled
eslint
rules. Please consider fixing them:app/assets/javascripts/organizations/mock_groups.js
Run the following command for more details
node_modules/.bin/eslint --report-unused-disable-directives --no-inline-config \ 'app/assets/javascripts/organizations/mock_groups.js'
Multiversion compatibility
This merge request updates GraphQL backend and frontend code.
To prevent an incident, ensure the updated frontend code is backwards compatible.
For more information, see the multiversion compatibility documentation.
Reviewer roulette
Category Reviewer Maintainer backend @shreyasagarwal
(UTC+2, 7 hours ahead of author)
@ahuntsman
(UTC-5, same timezone as author)
frontend @dzubova
(UTC+2, 7 hours ahead of author)
@ealcantara
(UTC+2, 7 hours ahead of author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 329ebd96 and a4c6864a
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4.32 MB 4.32 MB - 0.0 % mainChunk 3.31 MB 3.31 MB - 0.0 %
Note: We do not have exact data for 329ebd96. So we have used data from: 0c98f747.
The intended commit has no webpack pipeline, so we chose the last commit with one before it.Please look at the full report for more details
Read more about how this report works.
Generated by
Dangeradded 25 commits
-
af08607e...864c303a - 24 commits from branch
master
- 9dda595e - Organizations API - Delayed group deletion
-
af08607e...864c303a - 24 commits from branch
- Resolved by Robert May
- Resolved by Enrique Alcántara
- Resolved by Robert May
- Resolved by Robert May
- Resolved by Enrique Alcántara
- Resolved by Robert May
- Resolved by Robert May
Hey @SamWord! Do you have capacity for a backend review here? This change is the API portion for #442810 (closed).
This change is very heavily modeled after its Projects counterpart !147949 (merged). The Frontend MR hasn't been created yet but will look very similar to !147479 (merged).
This change adds the fields to the API that we need to power the upcoming frontend changes. I have provided context in various threads and in the description as well.
Please let me know if you have any questions
- Resolved by Robert May
Hey @kpalchyk! Do you have capacity for a frontend review here? This change is the API portion for #442810 (closed).
This change is very heavily modeled after its Projects counterpart !147949 (merged). The Frontend MR hasn't been created yet but will look very similar to !147479 (merged).
This change adds the fields to the API that we need to power the upcoming frontend changes. I have provided context in various threads and in the description as well.
Please let me know if you have any questions
added 156 commits
-
9dda595e...45031aad - 155 commits from branch
master
- c2e7c7a3 - Organizations API - Delayed group deletion
-
9dda595e...45031aad - 155 commits from branch
mentioned in merge request !148701 (merged)
- Resolved by Kos Palchyk
requested review from @ealcantara
added pipeline:mr-approved label
- Resolved by Zack Cuddy
@kpalchyk
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for a4c6864aexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 35 | 0 | 1 | 0 | 36 | ✅ | | Create | 83 | 0 | 9 | 0 | 92 | ✅ | | Govern | 66 | 0 | 0 | 0 | 66 | ✅ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | | Monitor | 7 | 0 | 0 | 0 | 7 | ✅ | | Data Stores | 31 | 0 | 0 | 0 | 31 | ✅ | | Plan | 51 | 0 | 2 | 0 | 53 | ✅ | | Package | 24 | 0 | 6 | 0 | 30 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 304 | 0 | 19 | 0 | 323 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for a4c6864aexpand test summary
+---------------------------------------------------------------------+ | suites summary | +----------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------+--------+--------+---------+-------+-------+--------+ | Plan | 249 | 0 | 19 | 0 | 268 | ✅ | | Configure | 1 | 0 | 9 | 0 | 10 | ✅ | | Create | 570 | 0 | 81 | 6 | 651 | ✅ | | Govern | 272 | 0 | 19 | 0 | 291 | ✅ | | Data Stores | 119 | 0 | 28 | 0 | 147 | ✅ | | Verify | 150 | 0 | 30 | 0 | 180 | ✅ | | Manage | 38 | 0 | 12 | 0 | 50 | ✅ | | Package | 205 | 0 | 38 | 0 | 243 | ✅ | | Systems | 10 | 0 | 0 | 0 | 10 | ✅ | | GitLab Metrics | 2 | 0 | 1 | 0 | 3 | ✅ | | Analytics | 7 | 0 | 0 | 0 | 7 | ✅ | | Fulfillment | 8 | 0 | 75 | 1 | 83 | ✅ | | Monitor | 36 | 0 | 13 | 0 | 49 | ✅ | | Secure | 6 | 0 | 3 | 0 | 9 | ✅ | | Growth | 0 | 0 | 6 | 0 | 6 | ➖ | | Release | 15 | 0 | 3 | 0 | 18 | ✅ | | Ai-powered | 0 | 0 | 3 | 0 | 3 | ➖ | | ModelOps | 0 | 0 | 3 | 0 | 3 | ➖ | +----------------+--------+--------+---------+-------+-------+--------+ | Total | 1688 | 0 | 343 | 7 | 2031 | ✅ | +----------------+--------+--------+---------+-------+-------+--------+
added 574 commits
-
c2e7c7a3...da3c008b - 572 commits from branch
master
- 8c301fd9 - Organizations API - Delayed group deletion
- b659b722 - Changes based on FE feedback
-
c2e7c7a3...da3c008b - 572 commits from branch
mentioned in incident gitlab-org/quality/engineering-productivity/review-apps-broken-incidents#1570 (closed)
mentioned in merge request !148997 (merged)
removed pipeline:mr-approved label
- Resolved by Zack Cuddy
- Resolved by Zack Cuddy
added pipeline:mr-approved label
requested review from @robotmay_gitlab and removed review request for @ivaneG
mentioned in incident gitlab-org/quality/engineering-productivity/review-apps-broken-incidents#1576 (closed)
mentioned in incident gitlab-org/quality/engineering-productivity/review-apps-broken-incidents#1594 (closed)
removed pipeline:mr-approved label
marked the checklist item Merge target MR: !148997 (merged) as completed
added 279 commits
-
72615987...fc359cfa - 276 commits from branch
master
- 6be5f856 - Organizations API - Delayed group deletion
- c7785887 - Changes based on FE feedback
- a4c6864a - Changes based on BE feedback
Toggle commit list-
72615987...fc359cfa - 276 commits from branch
removed review request for @kpalchyk
- Resolved by Robert May
Target branch just merged, looks like we lost the approvals
At this point I believe we are just awaiting backend maintainer review @robotmay_gitlab.
Please let me know if you have any questions, sorry for the jumpiness of this MR it had a few iterations
added pipeline:mr-approved label
enabled an automatic merge when the pipeline for 9fef8b5d succeeds
mentioned in commit 00cad7ae
mentioned in incident gitlab-org/quality/engineering-productivity/master-broken-incidents#5856 (closed)
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
added workflowpost-deploy-db-production label and removed workflowproduction label
added releasedpublished label and removed releasedcandidate label
added pipelinetier-3 label
added devopstenant scale grouporganizations sectioninfrastructure platforms labels and removed devopsdata stores grouptenant scale [DEPRECATED] sectioncore platform labels