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

Chore: Faster Docker image cleanup #2687

Merged
merged 1 commit into from Feb 16, 2023
Merged

Conversation

stumpylog
Copy link
Member

Proposed change

Alright, I got fed up with the cleaning taking nearly an hour, all of that due to the confirmation step I added.

Now, instead of pulling every tag for every image, the tool uses inspection to confirm the index for a tag can be found and the digests the index points to (the actual image data with layers) can also be found and inspected. The assumption being, if something were deleted inadvertently, it will no longer be inspectable, because it's gone.

It helps to know that indexes have a list of descriptors where the digest field points to the actual image manifest. This change simple follows the linkage to the end, but without downloading the image layers.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner February 16, 2023 18:34
@paperless-ngx-secretary paperless-ngx-secretary bot added ci-cd non-trivial Requires approval by several team members labels Feb 16, 2023
Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Awesome thanks, yes I agree these have been a little annoying. It kinda feels like GH should be handling this with some kind retention policy or whatever but appreciate the solution. Approving based on looking through the action log, I don't have much to add code-wise

@stumpylog stumpylog merged commit ee272da into dev Feb 16, 2023
@stumpylog stumpylog deleted the faster-cleanup-images-checking branch February 16, 2023 21:03
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ci-cd non-trivial Requires approval by several team members
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants