Users without possible spam contributions can be deleted immediately
What does this MR do and why?
Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/386
When a user without possible spam contributions deletes their own account their record will be deleted immediately (without 7-day delay introduced by https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/346).
Please read through this thread to have a better context for the changes in this MR.
New query
SELECT 1 AS one FROM "events" WHERE "events"."author_id" = 1614863 AND ("events"."action" = 6 OR "events"."action" = 1 AND "events"."target_type" IN ('Issue', 'MergeRequest')) LIMIT 1
Query plan: https://console.postgres.ai/shared/38f32daf-4299-4438-b0c0-880729d16448
How to set up and validate locally
- Turn on the feature flag
$ rails console > Feature.enable(:delay_delete_own_user)
- Create a new user to delete
- Go to
http://localhost:3000/-/profile/account
then delete the account - Validate that the user is deleted a few minutes later instead after 7 days
> User.find(<id>) ActiveRecord::RecordNotFound: Couldn't find User with 'id'=<id>
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.
Merge request reports
Activity
changed milestone to %16.1
assigned to @eugielimpin
added devopsanti-abuse label
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
added 1 commit
- 5d6910c2 - Do not delay own user record deletion when user has no contributions
added 1 commit
- ce0277cb - Do not delay own user record deletion when user has no contributions
- A deleted user
added backend label
2 Warnings 7e8bcd8e: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
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 David Dieulivol (
@ddieulivol
) (UTC+2, 6 hours behind@eugielimpin
)Dylan Griffith (
@DylanGriffith
) (UTC+10, 2 hours ahead of@eugielimpin
)database Sincheol (David) Kim (
@dskim_gitlab
) (UTC+9.5, 1.5 hours ahead of@eugielimpin
)Dylan Griffith (
@DylanGriffith
) (UTC+10, 2 hours ahead of@eugielimpin
)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
DangerAllure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 521547f3expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Create | 8 | 0 | 1 | 0 | 9 | ✅ | | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Govern | 2 | 0 | 0 | 0 | 2 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Data Stores | 2 | 0 | 0 | 1 | 2 | ❗ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 21 | 0 | 2 | 1 | 23 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+
added 841 commits
-
ce0277cb...3da4239a - 840 commits from branch
master
- d79d5544 - Do not delay own user record deletion when user has no contributions
-
ce0277cb...3da4239a - 840 commits from branch
added 1 commit
- a763b9ee - Do not delay own user record deletion when user has no contributions
- Resolved by Radamanthus Batnag
Hey @serenafang
Could you do the initial backend review for this MR, please?
added workflowin review label and removed workflowin dev label
requested review from @serenafang
requested review from @radbatnag and removed review request for @serenafang
added 887 commits
-
a763b9ee...65909370 - 886 commits from branch
master
- 9f66ccd8 - Do not delay own user record deletion when user has no contributions
-
a763b9ee...65909370 - 886 commits from branch
added 18 commits
-
9f66ccd8...a9eddc96 - 17 commits from branch
master
- 7e8bcd8e - Do not delay own user record deletion when user has no contributions
-
9f66ccd8...a9eddc96 - 17 commits from branch
- Resolved by Radamanthus Batnag
- Resolved by Radamanthus Batnag
- Resolved by Radamanthus Batnag
Great work @eugielimpin !
I left some suggestions to improve spec coverage for your consideration.
Back to you
added database label
- Resolved by Pavel Shutsin
Hey @dbiryukov
Could you do the initial database review for this MR, please?
requested review from @dbiryukov
@radbatnag
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
added pipeline:mr-approved label
- Resolved by Pavel Shutsin
@bmarjanovic
Could you do the backend maintainer review for this MR, please?
- A deleted user
added databasereview pending label
requested review from @bmarjanovic
removed review request for @dbiryukov
removed review request for @bmarjanovic
requested review from @pshutsin and removed review request for @radbatnag
added databaseapproved label and removed databasereview pending label
removed review request for @pshutsin
enabled an automatic merge when the pipeline for a8a83d0b succeeds
mentioned in commit 52534e24
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label
mentioned in merge request !125175 (merged)
mentioned in issue bmarjanovic/growth-and-development#1
mentioned in merge request gitlab-com/www-gitlab-com!135218 (merged)