GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

Allow error skipping when deleting manifest #118

Closed mpaletou closed 1 year ago

mpaletou commented 2 years ago

TL;DR

Google Artifact registry return GOOGLE_MANIFEST_DANGLING_PARENT_IMAGE: Manifest is still referenced by one or more parent images * failed to delete digest when performing a cleanup in a multi-arch docker registry.

A quick fix may be to add --skip-errors option as it should not be a blocking issue.

Expected behavior

Manifest delete errors are logged but cleanup operation still running

Observed behavior

Error code 400 returned on HTTP call and cleanup operation is aborted

Debug log output

No response

Additional information

We are using multi-arch images in our organization with manifest-tool.

As an example, it is creating 3 images (if we support amd64 & arm64):

If we browse into the registry, 5 references are effectivly created:

lauraseidler commented 1 year ago

We have the exact same problem - multi arch images (built with buildx in our case), that are expected to be untagged but shouldn't be deleted.