container-retention-policy: Manifest Unknown After Cleanup on Skipped Tag, Amd64 Arch only
My container retention job meets expectations, except that every 7th day when it cleans up my “app” container, I am unable to pull the amd64 image. Though, the arm64 image pulls fine. Seems like this cleanup job is deleting a tag which my protected tag depends on? Bizarre behavior, as the tags that are being deleted are totally unrelated and deleting one tag shouldnt affect another. Any thoughts or insight here?
Thanks!
I get this error in my kube cluster every 7th day:
Failed to pull image "ghcr.io/../app:development": rpc error: code = Unknown desc = manifest unknown
I cant replicate the error from m1 machine (arm arch) – the pull is successful. From an amd64 machine, I am able to replicate the “manifest unknown” error.
docker pull ghcr.io/../app:development
development: Pulling from ../app
manifest unknown
My retention policy is set to every 7 days, and the “development” tag should be skipped. The tag that was cleaned up in the logs was a truncated hash.
name: Delete old unused GHCR container images
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:
jobs:
clean-ghcr:
name: Delete old unused GHCR container images
runs-on: ubuntu-latest
steps:
- name: Delete containers older than a week, ignore tags
uses: snok/container-retention-policy@v1
with:
image-names: app
cut-off: A week ago UTC
account-type: org
org-name: my-org
keep-at-least: 3
untagged-only: false
skip-tags: latest, v*, dev*, gamma, beta, 1*, 2*, 3*, 4*, 5*, 6*
token: ${{ secrets.TOKEN }}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 17 (8 by maintainers)
Haven’t looked at this since October, mostly since it doesn’t affect me personally yet. It will as soon as Github actions lets me build arm images on arm-runners 🙃
Would you be interested in implementing a fix @Eddman?
thanks @sondrelg I’m going to track this down with GHCR, and will contribute if possible.