Refactor Members ActivateService
What does this MR do and why?
Issue: #361096 (closed)
This refactors the ::Members::ActivateService
by
- Using factory methods to initialize the service
- Use
update_all
instead of looping over each member - Make it clear that either an
invited
member, auser
or the wholegroup
gets activated.
This has the following advantages:
- The API is easier to use and less error prone. Before that you had to either pass
user
,member
oractivate_all: true
- We use an
update_all
instead of doing a looping over each Member - It's more clear what resource gets activates. Before this change, passing
member
did update all memberships of the given member's user.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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
Suggested Reviewers (beta)
The individuals below may be good candidates to participate in the review based on various factors.
You can use slash commands in comments to quickly assign
/assign_reviewer @user1
.Suggested Reviewers @mayra-cabrera
,@dbalexandre
,@dzaporozhets
,@marin
,@tkuah
If you do not believe these suggestions are useful, please apply the label Bad Suggested Reviewer. You can also provide feedback for this feature on this issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/357923
.Automatically generated by Suggested Reviewers Bot - an experimental ML-based recommendation engine created by ~"group::applied ml".
Edited by GitLab Reviewer-Recommender Bot1 Warning This merge request is quite big (773 lines changed), please consider splitting it into multiple merge requests. 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 Harsimar Sandhu ( @harsimarsandhu
) (UTC+5.5, 3.5 hours ahead of@nicolasdular
)Sean Arnold ( @seanarnold
) (UTC+12, 10 hours ahead of@nicolasdular
)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- Resolved by 🤖 GitLab Bot 🤖
@nicolasdular - please add typebug typefeature, typemaintenance or a subtype label to this merge request.- typebug: Defects in shipped code and fixes for those defects. This includes all the bug types (availability, performance, security vulnerability, mobile, etc.)
- typefeature: Effort to deliver new features, feature changes & improvements. This includes all changes as part of new product requirements like application limits.
- typemaintenance: Up-keeping efforts & catch-up corrective improvements that are not Features nor Bugs. This includes restructuring for long-term maintainability, stability, reducing technical debt, improving the contributor experience, or upgrading dependencies.
See the handbook for more guidance on classifying.
This message was created with automation and Engineering Productivity is looking for feedback in this issue:
https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/43
Allure report
allure-report-publisher
generated test report!review-qa-blocking:
test report for 99dfc94cexpand test summary
+---------------------------------------------------------------------------+ | suites summary | +----------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------------+--------+--------+---------+-------+-------+--------+ | Plan | 47 | 0 | 1 | 47 | 48 | ❗ | | Create | 23 | 0 | 2 | 23 | 25 | ❗ | | Verify | 12 | 0 | 1 | 12 | 13 | ❗ | | Manage | 37 | 0 | 2 | 39 | 39 | ❗ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Secure | 2 | 0 | 0 | 2 | 2 | ❗ | | Configure | 0 | 0 | 1 | 0 | 1 | ➖ | | Protect | 2 | 0 | 0 | 2 | 2 | ❗ | | Version sanity check | 0 | 0 | 1 | 0 | 1 | ➖ | +----------------------+--------+--------+---------+-------+-------+--------+ | Total | 123 | 0 | 9 | 125 | 132 | ❗ | +----------------------+--------+--------+---------+-------+-------+--------+
Setting label groupacquisition based on
@nicolasdular
's group.added groupacquisition label
changed milestone to %15.2
added devopsgrowth sectiongrowth labels
assigned to @nicolasdular
added 1165 commits
-
85e9670c...59a17eaf - 1164 commits from branch
master
- 131bf491 - Refactor Members ActivateService
-
85e9670c...59a17eaf - 1164 commits from branch
- A deleted user
added backend label
removed backend label
added typemaintenance label
- A deleted user
added backend label
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Nicolas Dular
requested review from @rkadam3
removed review request for @rkadam3
@rkadam3
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
- Resolved by Doug Stull
- Resolved by Doug Stull
Hey @dstull
Would you mind to take over the maintainer review as you have context around Members and looked at this code before already? No rush - I know it's a larger MR and I am sorry for that. I have no idea how to split it up as most of the refactoring affects test.
requested review from @dstull
- Resolved by Nicolas Dular
- Resolved by Nicolas Dular
- Resolved by Nicolas Dular
- Resolved by Nicolas Dular
- Resolved by Nicolas Dular
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Nicolas Dular
- Resolved by Doug Stull
- Resolved by Nicolas Dular
- Resolved by Doug Stull
removed review request for @dstull
requested review from @dstull
- Resolved by Doug Stull
- Resolved by Doug Stull
- Resolved by Doug Stull
removed review request for @dstull
requested review from @dstull
enabled an automatic merge when the pipeline for 0510c2f7 succeeds
mentioned in commit b0d03934
mentioned in issue #361096 (closed)
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
mentioned in merge request !90496 (merged)
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowstaging label and removed workflowproduction label
added workflowpost-deploy-db-staging label and removed workflowstaging label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request !155506