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

Improve check for duplicate tag versions of all image components #2147

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

danielhoherd
Copy link
Member

@danielhoherd danielhoherd commented Mar 8, 2024

Description

  • Add --check-tags feature to bin/show-docker-images.py and delete bin/verify_image_tags.py. This is a better implementation that covers more edge cases while reducing the overall LOC.
  • Improve existing pre-commit hook configs

The new output looks like this:

$ pre-commit run check-image-tags --all-files
Ensure unique tags per image.............................................Failed
- hook id: check-image-tags
- exit code: 1

ALERT: example.com/the-private-registry/ap-init has 2 different tags: 1.2.3, 3.18.6

You can also run this manually with bin/show-docker-images.py --private-registry --with-houston -c and the help text looks like this:

$ bin/show-docker-images.py --help
usage: show-docker-images.py [-h] [--private-registry] [-v] [--with-houston] [-c]

options:
  -h, --help          show this help message and exit
  --private-registry  show images when using private registry
  -v, --verbose       be verbose
  --with-houston      include images from houston configmap
  -c, --check-tags    Only check for multiple tags for the same image, do not print the images

Related Issues

Testing

As long as CI passes we're good. QA does not need to do anything here.

Merging

Merge everywhere.

@danielhoherd danielhoherd requested a review from a team as a code owner March 8, 2024 17:46
@danielhoherd danielhoherd merged commit 189ba75 into master Mar 20, 2024
7 of 8 checks passed
@danielhoherd danielhoherd deleted the 6023-ensure-one-version-per-component branch March 20, 2024 13:16
@danielhoherd
Copy link
Member Author

merged/cherry-picked to all release branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants