8000 registry/storage: add option to quiet GC output. by r4f4 · Pull Request #4560 · distribution/distribution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

registry/storage: add option to quiet GC output. #4560

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

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

r4f4
Copy link
Contributor
@r4f4 r4f4 commented Jan 31, 2025

Consumers might not want GC output to be displayed (e.g, if you have your own logging system).

Copy link
Member
@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

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

This is incomplete. You need to pass the Quiet setting to GC somehow:
likely through

var GCCmd = &cobra.Command{

Consumers might not want GC output to be displayed (e.g, if you have
your own logging system).

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
@r4f4 r4f4 force-pushed the garbage-collect-quiet branch from 5c98929 to a032989 Compare February 2, 2025 09:19
@r4f4
Copy link
Contributor Author
r4f4 commented Feb 2, 2025

Done:

 $ ./bin/registry garbage-collect --help
`garbage-collect` deletes layers not referenced by any manifests

Usage:
  registry garbage-collect <config> [flags]

Flags:
  -m, --delete-untagged   delete manifests that are not currently referenced via tag
  -d, --dry-run           do everything except remove the blobs
  -h, --help              help for garbage-collect
  -q, --quiet             silence output

Copy link
Member
@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

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

The code is fine now, but I think we should update the docs, too.
Sorry about not mentioning this on the previous review but would you mind mentioning the new cli switch in

## Run garbage collection

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
@r4f4
Copy link
Contributor Author
r4f4 commented Feb 3, 2025

The code is fine now, but I think we should update the docs, too. Sorry about not mentioning this on the previous review but would you mind mentioning the new cli switch in

## Run garbage collection

Good call. I've added --delete-untagged and --quiet to the garbage-collection docs.

Copy link
Member
@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

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

Copy link
Collaborator
@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@milosgajdos milosgajdos merged commit 63d3892 into distribution:main Feb 13, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0