Protected containers: Create protection rules in project settings
What does this MR do and why?
feat: Protected containers: Protection rules in project settings ui
- Adds frontend ui for the container protection rule in project settings
- Hide project setting for container protection rules when relevant feature flag is disabled
- Code mostly taken from Protected packages: Create package protection r... (!140473 - merged)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
MR Checklist (@gerardo-navarro)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Screenshots or screen recordings
Screencast: https://www.loom.com/share/8f1db270e25346b584fd0057ce1a554a
How to set up and validate locally
- Enable Registry by editting
config/gitlab.yml
with the following setting
registry:
enabled: true
- Restart GDK, see also https://docs.gitlab.com/ee/administration/packages/container_registry.html#configure-container-registry-under-an-existing-gitlab-domain
gdk restart
- In rails console enable the experiment fully
Feature.enable(:container_registry_protected_containers)
- Go to http://gdk.test:3000/flightjs/Flight/-/settings/packages_and_registries
- Start adding new container protection rules in the second half of the page and play around with the form
Related to #441345 (closed)
Merge request reports
Activity
added typefeature label
Hey @gerardo-navarro!
Thank you for your contribution to GitLab. Please refer to the contribution documentation for an overview of the process.
When you're ready for a first review, post
@gitlab-bot ready
. If you know a relevant reviewer(s) (for example, someone that was involved in a related issue), you can also assign them directly with@gitlab-bot ready @user1 @user2
.At any time, if you need help, feel free to post
@gitlab-bot help
or initiate a mentor session on Discord. Read more on how to get help.You can comment
@gitlab-bot label <label1> <label2>
to add labels to your MR. Please see the list of allowed labels in thelabel
command documentation.This message was generated automatically. You're welcome to improve it.
added Community contribution workflowin dev labels
assigned to @gerardo-navarro
- Resolved by Ezekiel Kigbo
2 Warnings This merge request is quite big (535 lines changed), please consider splitting it into multiple merge requests. 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.
Reviewer roulette
Category Reviewer Maintainer frontend @lorenzvanherwaarden
(UTC+2)
@slashmanov
(UTC+4)
UX @pedroms
(UTC+1)
Maintainer review is optional for UX 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
added linked-issue label
mentioned in issue gitlab-org/quality/triage-reports#16633 (closed)
added 1 commit
- 62320c96 - Protected containers: Create protection rules in project setting ui
marked the checklist item Documentation created/updated via this MR as completed
marked the checklist item Documentation reviewed by technical writer or follow-up review issue created as completed
marked the checklist item Tested in all supported browsers as completed
added 278 commits
-
62320c96...61a9d026 - 276 commits from branch
gitlab-org:master
- c30a364c - feat: Protected containers: Protection rules in project settings ui
- 02753ae6 - Protected containers: Create protection rules in project setting ui
-
62320c96...61a9d026 - 276 commits from branch
added backend documentation frontend labels
added groupcontainer registry label
added devopspackage sectionci labels
added Category:Container Registry label
added featureaddition label
added UX label
mentioned in issue #441345 (closed)
mentioned in merge request !146623 (merged)
@gerardo-navarro, it seems we're waiting on an action from you for approximately two weeks.
- Do you still have capacity to work on this? If not, you might want to close this MR and/or ask someone to take over.
- Do you need help in getting it ready? At any time, you can:
- If you're actually ready for a review, you can post
@gitlab-bot ready
.
This message was generated automatically. You're welcome to improve it.
added automation:author-reminded label
Thanks for helping us improve the UX of GitLab. Your contribution is appreciated! We have pinged our UX team, so stay tuned for their feedback.
This message was generated automatically. You're welcome to improve it.
added 2799 commits
-
02753ae6...1904f2cf - 2798 commits from branch
gitlab-org:master
- 97010721 - Protected containers: Create protection rules in project setting ui
-
02753ae6...1904f2cf - 2798 commits from branch
added workflowready for review label and removed workflowin dev label
@pedroms
@ekigbo
, this Community contribution is ready for review.- Do you have capacity and domain expertise to review this? If not, find one or more reviewers and assign to them.
- If you've reviewed it, add the workflowin dev label if these changes need more work before the next review.
This message was generated automatically. You're welcome to improve it.
removed automation:author-reminded label
requested review from @annabeldunstone and removed review request for @pedroms
requested review from @marcel.amirault
mentioned in issue #413641
added Technical Writing UI text labels
- Resolved by Ezekiel Kigbo
removed review request for @marcel.amirault
changed milestone to %16.11
- Resolved by Gerardo Navarro
- Resolved by Gerardo Navarro
- Resolved by Ezekiel Kigbo
- Resolved by Gerardo Navarro
- Resolved by Ezekiel Kigbo
- Resolved by Gerardo Navarro
- Resolved by Ezekiel Kigbo
Thanks for the great work @gerardo-navarro, I had a few suggestions and nitpicks otherwise back over to you.
Additionally, I couldn't see any tests for the feature flag state, I would expect to at least see a test that shows the form is not available when the feature flag is disabled
, I might have missed this from a previous MR though.Back over to you
added workflowin review label and removed workflowready for review label
added 510 commits
-
e23272e1...9b32aa4b - 508 commits from branch
gitlab-org:master
- e1653aa8 - Protected containers: Create protection rules in project setting ui
- 566a30c1 - refactor: Apply suggestion from @ekigbo
-
e23272e1...9b32aa4b - 508 commits from branch
added Leading Organization label
mentioned in commit gitlab-community/gitlab@e8b110fe
mentioned in merge request !148699
mentioned in commit gitlab-community/gitlab@b4819a81
mentioned in commit gitlab-community/gitlab@0173c0ee
mentioned in merge request !148704 (merged)
added pipeline:mr-approved label
- Resolved by Ezekiel Kigbo
@annabeldunstone
, 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
, please start a new pipeline before merging.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.
removed review request for @annabeldunstone
mentioned in commit gitlab-community/gitlab@3f36474b
mentioned in commit gitlab-community/gitlab@eef5781d
requested review from @ekigbo
mentioned in commit gitlab-community/gitlab@97b3f4f6
requested review from @marcel.amirault
removed review request for @marcel.amirault
mentioned in issue gitlab-org/quality/triage-reports#17183 (closed)
mentioned in commit gitlab-community/gitlab@46ed27c9
mentioned in commit gitlab-community/gitlab@2835356b
added 286 commits
-
5661aa53...b494688c - 284 commits from branch
gitlab-org:master
- bef16eb8 - Protected containers: Create protection rules in project setting ui
- 9d27b6b3 - refactor: Apply suggestion from @ekigbo
-
5661aa53...b494688c - 284 commits from branch
mentioned in merge request !148838 (merged)
added 1 commit
- d5741a84 - refactor: Apply suggestion from @marcel.amirault
- Resolved by Gerardo Navarro
@gerardo-navarro It looks like we have some related ~frontend test failures. As far as I can tell:
- the submit button was renamed from
Protect
toAdd rule
- we do not disable the form inputs
This should fix those:
diff --git a/spec/frontend/packages_and_registries/settings/project/settings/components/container_protection_rule_form_spec.js b/spec/frontend/packages_and_registries/settings/project/settings/components/container_protection_rule_form_spec.js index 40a56c85dd7b..1da15193b06f 100644 --- a/spec/frontend/packages_and_registries/settings/project/settings/components/container_protection_rule_form_spec.js +++ b/spec/frontend/packages_and_registries/settings/project/settings/components/container_protection_rule_form_spec.js @@ -29,7 +29,7 @@ describe('container Protection Rule Form', () => { wrapper.findByRole('combobox', { name: /push protected up to access level/i }); const findDeleteProtectedUpToAccessLevelSelect = () => wrapper.findByRole('combobox', { name: /delete protected up to access level/i }); - const findSubmitButton = () => wrapper.findByRole('button', { name: /protect/i }); + const findSubmitButton = () => wrapper.findByRole('button', { name: /add rule/i }); const mountComponent = ({ config, provide = defaultProvidedValues } = {}) => { wrapper = mountExtended(ContainerProtectionRuleForm, { @@ -77,7 +77,6 @@ describe('container Protection Rule Form', () => { it('disables all form fields', () => { expect(findSubmitButton().props('disabled')).toBe(true); - expect(findRepositoryPathPatternInput().attributes('disabled')).toBe('disabled'); expect(findPushProtectedUpToAccessLevelSelect().attributes('disabled')).toBe('disabled'); expect(findDeleteProtectedUpToAccessLevelSelect().attributes('disabled')).toBe('disabled'); });
- the submit button was renamed from
added 266 commits
-
d5741a84...17ca61f5 - 263 commits from branch
gitlab-org:master
- 366deb54 - Protected containers: Create protection rules in project setting ui
- fe7c5663 - refactor: Apply suggestion from @ekigbo
- 1330bfeb - refactor: Apply suggestion from @marcel.amirault
Toggle commit list-
d5741a84...17ca61f5 - 263 commits from branch
added 220 commits
-
1330bfeb...fa08c704 - 216 commits from branch
gitlab-org:master
- 41b3bee7 - Protected containers: Create protection rules in project setting ui
- 94285485 - refactor: Apply suggestion from @ekigbo
- 465ef152 - refactor: Apply suggestion from @marcel.amirault
- ad3a2e6b - refactor: Apply suggestion from @ekigbo
Toggle commit list-
1330bfeb...fa08c704 - 216 commits from branch
added 1 commit
- 3b5a16f9 - refactor: Apply suggestion from @marcel.amirault
mentioned in commit gitlab-community/gitlab@cb94b4e6
added 2 commits
- cb94b4e6 - refactor: Apply suggestion from @marcel.amirault
- 8f6030ea - refactor: Apply suggestion from @ekigbo
mentioned in commit gitlab-community/gitlab@79aca4d0
Thanks for all the great work @gerardo-navarro LGTM!
enabled an automatic merge when the pipeline for f9738343 succeeds
2 Warnings This merge request is quite big (535 lines changed), please consider splitting it into multiple merge requests. 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.
Reviewer roulette
Category Reviewer Maintainer frontend @lorenzvanherwaarden
(UTC+2)
@slashmanov
(UTC+4)
UX @pedroms
(UTC+1)
Maintainer review is optional for UX 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
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits ef57c6e7 and 45effae4
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4.25 MB 4.25 MB - 0.0 % mainChunk 3.23 MB 3.23 MB - 0.0 % Significant Growth: 1Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.projects.settings.packages_and_registries.show 471.43 KB 485.84 KB +14.4 KB 3.1 %
Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.
Please consider pinging someone from the FE Foundations (
@leipert
,@markrian
,@pgascouvaillancourt
,@sdejonge
or@thutterer
) for review, if you are unsure about the size increase.Note: We do not have exact data for ef57c6e7. So we have used data from: a3aabce1.
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
Dangermentioned in commit b7cb3e61
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 45effae4expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Create | 77 | 0 | 9 | 0 | 86 | ✅ | | Data Stores | 31 | 0 | 0 | 0 | 31 | ✅ | | Govern | 66 | 0 | 0 | 0 | 66 | ✅ | | Package | 24 | 0 | 6 | 0 | 30 | ✅ | | Plan | 51 | 0 | 2 | 0 | 53 | ✅ | | Monitor | 7 | 0 | 0 | 0 | 7 | ✅ | | Verify | 35 | 0 | 1 | 0 | 36 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 298 | 0 | 19 | 0 | 317 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 45effae4expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Package | 206 | 0 | 38 | 0 | 244 | ✅ | | Create | 152 | 0 | 21 | 2 | 173 | ✅ | | Plan | 8 | 0 | 0 | 0 | 8 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Govern | 6 | 0 | 0 | 0 | 6 | ✅ | | Data Stores | 4 | 0 | 0 | 0 | 4 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 384 | 0 | 59 | 2 | 443 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
mentioned in commit f5af232f
mentioned in incident gitlab-org/quality/engineering-productivity/approved-mr-pipeline-incidents#78 (closed)
mentioned in commit gitlab-community/gitlab@fcae524a
added 76 commits
-
8f6030ea...3e41b355 - 72 commits from branch
gitlab-org:master
- 265ef705 - Protected containers: Create protection rules in project setting ui
- 1970b223 - refactor: Apply suggestion from @ekigbo
- fcae524a - refactor: Apply suggestion from @marcel.amirault
- 45effae4 - refactor: Apply suggestion from @ekigbo
Toggle commit list-
8f6030ea...3e41b355 - 72 commits from branch
mentioned in incident gitlab-org/quality/engineering-productivity/review-apps-broken-incidents#1586 (closed)
enabled an automatic merge when the pipeline for 02098182 succeeds
@gerardo-navarro, how was your code review experience with this merge request? Please tell us how we can continue to iterate and improve:
- React with a
or a on this comment to describe your experience. - Create a new comment starting with
@gitlab-bot feedback
below, and leave any additional feedback you have for us in the comment.
Subscribe to the GitLab Community Newsletter for contributor-focused content and opportunities to level up.
Thanks for your help!
This message was generated automatically. You're welcome to improve it.
- React with a
mentioned in commit 01edc95c
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
mentioned in merge request !146622 (merged)
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-production label and removed workflowproduction label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!2945 (merged)
mentioned in merge request omnibus-gitlab!7682 (merged)
added releasedpublished label and removed releasedcandidate label
added pipelinetier-3 label
mentioned in issue #480012