Allow tag deletion on broken tags
🏷 What does this MR do and why?
Sometimes when working with the container registry, one of the tags in your repository may be broken or corrupted. Currently, when that happens, we see it displayed with a warning symbol. The problem is, there is no way to delete the tag.
This MR:
- Updates the frontend to allow users to delete broken tags.
- Updates the public API to not reject requests to delete broken tags.
The frontend uses GraphQL, which does not include the validation that the public API is using. This is why we only update the API, but not GraphQL.
🎥 Screenshots or screen recordings
Before | After |
---|---|
🏠 How to set up and validate locally
- To use the exact examples below, create a project named
brokenimage
- In a new directory, create a
Dockerfile
with the content:FROM alpine:3.14
- In the same directory, create a file
buildkitd.toml
with the content:debug = true # root is where all buildkit state is stored. root = "/var/lib/buildkit" # insecure-entitlements allows insecure entitlements, disabled by default. insecure-entitlements = [ "network.host", "security.insecure" ] [registry."gdk.test:5000"] http = true insecure = true
- Create a new buildx instance that allows insecure registry requests:
docker buildx create --use --name insecure-b --config buildkitd.toml --buildkitd-flags '--allow-insecure-entitlement security.insecure'
- Push the broken image:
docker buildx build --allow security.insecure --tag gdk.test:5000/root/brokenimage:asdf1234 --tag gdk.test:5000/root/brokenimage:foobar --cache-from=type=registry,ref=gdk.test:5000/root/brokenimage:foobar --cache-to=type=registry,ref=gdk.test:5000/root/brokenimage:foobar --push .
- Navigate to your project's registry and select the repository that has been created
Packages & Registries -> Container Registry -> Root Image
. - You should see the broken tag.
- You should be able to select the checkbox. You should see the "more actions menu" on the right and should be able to delete the tag.
📐 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.
Related to #341939 (closed), #342866 (closed)
Edited by Steve Abrams