Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image cleanup to handle images with tag + digest #442

Merged
merged 3 commits into from
Jan 26, 2023
Merged

Conversation

mctofu
Copy link
Contributor

@mctofu mctofu commented Jan 26, 2023

We recently started pinning the Docker images via tag & sha in #375.

However, the cleanup process wasn't prepared for this and was no longer able to detect which image was the current one. It was expecting to match the current image name (image + tag + sha) with the list of digests returned by Docker (image + sha). That results in all the images being deleted on each run.

This process adjusts the cleanup process to extract an image name without the tag so we'll be able to match the current image against the Docker.Imageinfo.RepoDigests list.

@mctofu mctofu marked this pull request as ready for review January 26, 2023 21:41
@mctofu mctofu requested a review from a team as a code owner January 26, 2023 21:41
Copy link
Contributor

@pavera pavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mctofu mctofu merged commit c47a059 into main Jan 26, 2023
@mctofu mctofu deleted the mctofu/fix-cleanup branch January 26, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants