Protected containers: Add DELETE REST API for container protection rules
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
Protected containers: Add DELETE REST API for container protection rules
This MR adds the DELETE route to the REST API for container protection rules to allow deleting existing container protection rules.
This is part of #457518 (closed) and still behind a feature flag.
It's the equivalent to the DELETE
endpoint for package protection rules
, but for the container registry
.
MR acceptance checklist
MR Checklist ( @nwittstruck)
-
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
How to set up and validate locally
- Enable feature flag via
rails c
:
Feature.enable(:container_registry_protected_containers)
- Create a new container protection rule:
curl -k --request POST \
--url https://gdk.test:3443/api/v4/projects/7/registry/protection/rules \
--header 'Authorization: Bearer ypCa3Dzb23o5nvsixwPA' \
--header 'Content-Type: application/json' \
--data '{
"repository_path_pattern": "flightjs/flight-needs-to-be-a-unique-path",
"minimum_access_level_for_push": "maintainer",
"minimum_access_level_for_delete": "maintainer"
}'
- Now you can delete this rule - just adjust the
id
to theid
returned by the previous command:
curl -k --request DELETE \
--url https://gdk.test:3443/api/v4/projects/7/registry/protection/rules/1 \
--header 'Authorization: Bearer ypCa3Dzb23o5nvsixwPA'
Related to #457518 (closed)
Merge request reports
Activity
added devopspackage groupcontainer registry sectionci typefeature labels
added Leading Organization label
mentioned in issue #457518 (closed)
added pipelinetier-1 label
Thanks for your contribution to GitLab @nwittstruck!
- If you need help, comment @gitlab-bot help or come say hi on Discord.
- When you're ready for a review, comment on this merge request with @gitlab-bot ready.
- We welcome AI-generated contributions! Read more/check the box at the top of the merge request description.
- To add labels to your merge request, comment @gitlab-bot label ~"label1" ~"label2".
This message was generated automatically. You're welcome to improve it.
added Community contribution workflowin dev labels
assigned to @nwittstruck
added linked-issue label
added 1 commit
- 07c112e2 - Protected containers: Add DELETE REST API for container protection rules
- Resolved by Nicholas Wittstruck
- Resolved by Kamil Trzciński
2 Warnings 850b6fed: Use full URLs instead of short references ( gitlab-org/gitlab#123
or!123
), as short references are displayed as plain text outside of GitLab. For more information, take a look at our Commit message guidelines.This merge request does not refer to an existing milestone. 1 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/project_container_registry_protection_rules.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.
Reviewer roulette
Category Reviewer Maintainer backend @missy-gitlab
(UTC-4)
@ayufan
(UTC+2)
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
DangerEdited by Danger Bot -
added backend documentation labels
added workflowready for review label and removed workflowin dev label
requested review from @mkhalifa3 and @marcel.amirault
Hi
@marcel.amirault
! Please review this documentation merge request. This message was generated automatically. You're welcome to improve it.added twtriaged label
@marcel.amirault @mkhalifa3, 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.
- Resolved by Nicholas Wittstruck
added pipeline:mr-approved label
removed review request for @marcel.amirault
added pipelinetier-3 label and removed pipelinetier-1 label
- Resolved by Kamil Trzciński
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3.
Before you resolve this discussion, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please resolve this discussion and the set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
Hi
@marcel.amirault
,GitLab Bot has added the Technical Writing label because a Technical Writer has approved or merged this MR.
This message was generated automatically. You're welcome to improve it.
added Technical Writing label
added docsfeature pipelinetier-1 labels and removed Technical Writing pipelinetier-3 labels
added Technical Writing label
mentioned in issue gitlab-org/quality/triage-reports#18798 (closed)
- Resolved by Moaz Khalifa
- Resolved by Moaz Khalifa
- Resolved by Moaz Khalifa
- Resolved by Moaz Khalifa
added workflowin dev label and removed workflowready for review label
removed review request for @mkhalifa3
added 1 commit
- 491bcbc4 - Protected containers: Add DELETE REST API for container protection rules
reset approvals from @marcel.amirault by pushing to the branch
added 1112 commits
-
491bcbc4...0adb1a5f - 1109 commits from branch
gitlab-org:master
- cf008789 - Protected containers: Add DELETE REST API for container protection rules
- aec71ebb - Protected containers: Add DELETE REST API for container protection rules
- 21ca76e2 - Protected containers: Add DELETE REST API for container protection rules
Toggle commit list-
491bcbc4...0adb1a5f - 1109 commits from branch
added workflowready for review label and removed workflowin dev label
requested review from @mkhalifa3
@mkhalifa3, 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.
mentioned in issue gitlab-org/quality/triage-reports#18910 (closed)
- Resolved by Moaz Khalifa
- Resolved by Moaz Khalifa
- Resolved by Moaz Khalifa
added pipelinetier-2 label and removed pipelinetier-1 label
requested review from @ayufan and removed review request for @mkhalifa3
added pipelinetier-3 label and removed pipelinetier-2 label
requested review from @mkhalifa3
removed review request for @ayufan
added 1831 commits
-
21ca76e2...928a6691 - 1827 commits from branch
gitlab-org:master
- 358d09f9 - Protected containers: Add DELETE REST API for container protection rules
- 9524ddcf - Protected containers: Add DELETE REST API for container protection rules
- b7587b43 - Protected containers: Add DELETE REST API for container protection rules
- 44167e51 - Protected containers: Add DELETE REST API for container protection rules
Toggle commit list-
21ca76e2...928a6691 - 1827 commits from branch
reset approvals from @ayufan by pushing to the branch
requested review from @ayufan
removed review request for @mkhalifa3
mentioned in issue gitlab-org/quality/triage-reports#19081 (closed)
marked the checklist item Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA as completed
added 1328 commits
-
44167e51...8678b11a - 1324 commits from branch
gitlab-org:master
- d19e4b47 - Protected containers: Add DELETE REST API for container protection rules
- 4147ef8a - Protected containers: Add DELETE REST API for container protection rules
- 43719143 - Protected containers: Add DELETE REST API for container protection rules
- a20ade29 - Protected containers: Add DELETE REST API for container protection rules
Toggle commit list-
44167e51...8678b11a - 1324 commits from branch
marked the checklist item Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA as incomplete
marked the checklist item Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA as completed
- Resolved by Kamil Trzciński
2 Warnings 850b6fed: Use full URLs instead of short references ( gitlab-org/gitlab#123
or!123
), as short references are displayed as plain text outside of GitLab. For more information, take a look at our Commit message guidelines.This merge request does not refer to an existing milestone. 1 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/project_container_registry_protection_rules.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.
Reviewer roulette
Category Reviewer Maintainer backend @missy-gitlab
(UTC-4)
@ayufan
(UTC+2)
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-
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 04229c95expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Data Stores | 31 | 0 | 1 | 0 | 32 | ✅ | | Create | 127 | 0 | 12 | 0 | 139 | ✅ | | Verify | 44 | 0 | 2 | 0 | 46 | ✅ | | Govern | 71 | 0 | 0 | 0 | 71 | ✅ | | Package | 16 | 0 | 15 | 0 | 31 | ✅ | | Plan | 70 | 0 | 0 | 0 | 70 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 1 | 0 | 1 | 0 | 2 | ✅ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | | Fulfillment | 2 | 0 | 0 | 0 | 2 | ✅ | | Secure | 2 | 0 | 0 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 379 | 0 | 31 | 0 | 410 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for a20ade29expand test summary
+--------------------------------------------------------------+ | suites summary | +---------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +---------+--------+--------+---------+-------+-------+--------+ | Package | 28 | 0 | 17 | 1 | 45 | ✅ | | Create | 270 | 0 | 34 | 0 | 304 | ✅ | +---------+--------+--------+---------+-------+-------+--------+ | Total | 298 | 0 | 51 | 1 | 349 | ✅ | +---------+--------+--------+---------+-------+-------+--------+
Security policy violations have been resolved.
Edited by GitLab Security Botadded 422 commits
-
a20ade29...e9b70ffa - 418 commits from branch
gitlab-org:master
- 56290aad - Protected containers: Add DELETE REST API for container protection rules
- 850b6fed - Protected containers: Add DELETE REST API for container protection rules
- 098d5042 - Protected containers: Add DELETE REST API for container protection rules
- 04229c95 - Protected containers: Add DELETE REST API for container protection rules
Toggle commit list-
a20ade29...e9b70ffa - 418 commits from branch
mentioned in issue gitlab-org/quality/triage-reports#19193 (closed)
started a merge train
@nwittstruck, 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 e6264b1d
mentioned in merge request !162561 (merged)
added workflowstaging-canary label and removed workflowready for review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
changed milestone to %17.4
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 kubitus-project/kubitus-installer!3354 (merged)
added releasedpublished label and removed releasedcandidate label