-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add bulk tagger #1954
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
Add bulk tagger #1954
Conversation
Summary of ChangesHello @loosebazooka, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a specialized bash script for managing container image lifecycles by enabling bulk tagging operations within a registry. The primary goal is to facilitate the identification and marking of stale images for potential updates, and to provide a framework for deprecating images, thereby improving repository maintenance and auditing without immediately deleting images. This new tool is designed to be more effective for the repository's specific needs compared to generic solutions. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
🌳 🔧 Config Check This pull request has not modified the root BUILD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new script for bulk-tagging container images, along with its documentation. The script is well-structured, but there are several areas for improvement in terms of robustness, readability, and best practices in shell scripting. My review includes suggestions to improve error handling, remove magic numbers, clarify variable validation, use professional error messages, and fix a bug in command-line argument parsing. I've also suggested a minor clarification in the README file.
9340491 to
b695030
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new shell script for bulk-tagging container images, along with its documentation. The script is well-structured and the addition of a README is great for usability.
My review includes a critical fix for a logic error in command chaining that would cause the script to exit prematurely on success. I've also included several medium-severity suggestions to improve code readability and maintainability, such as removing a magic number, cleaning up dead code, and clarifying the documentation.
5350dd2 to
c0424dd
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new bash script for bulk-tagging container images, along with its documentation. The script is well-structured and uses modern bash features. My review focuses on improving maintainability by using constants, enhancing clarity in argument parsing and error messages, and fixing a potentially incorrect filter that could lead to tagging the wrong images. The accompanying README is clear and helpful.
|
🌳 🔄 Image Check |
c0424dd to
6775695
Compare
| '); | ||
|
|
||
| echo "tagging ${#targets[@]} images of $image" | ||
| echo "disabled for now, edit out comment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you going to leave this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't have a use for it until Debian 14
Signed-off-by: Appu Goundan <[email protected]>
6775695 to
c50abdd
Compare
Here's something that actually works for our repository instead of the default script.
An intial run on a big set (20K images) like
gcr.io/distroless/baselooks like it takes about 16 hours. But after that, it should only tag newly out-of-date images. There are no parallelization optimizations.