GoogleCloudPlatform / gcr-cleaner

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

Difference between docs and and help pages and expected behavior #136

Closed grabango-ttharp closed 1 year ago

grabango-ttharp commented 1 year ago

TL;DR

Running command with -dry_run=true command results in failure. Docs show that command is -dry_run=true command that works is -dry-run=true Help page also shows that the proper command is -dry-run

Expected behavior

-dry-run=true should be changed in docs

Observed behavior

-dry_run=true does not work

Debug log output

docker run -it us-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli -repo=gcr.io -dry_run=true
flag provided but not defined: -dry_run
Usage of /bin/gcr-cleaner-cli:

  Deletes untagged or stale images from a Docker registry.

Additional information

No response

sethvargo commented 1 year ago

Hi @grabango-ttharp

None of the documentation in this repo suggests using "dry_run=true" on the CLI. I believe you're referring to the Server Payload & Parameters, which has the following warning at the top:

⚠️ This section is for the server payload. If you are using the CLI tool, run gcr-cleaner -h to see the list of flags and their descriptions.

As the warning implies, please run gcr-cleaner -h to see the full list of CLI flags and that pertain to the version of gcr-cleaner that you have downloaded.