-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Cherry-pick] Add bump version script; Make version release more automated #4521
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
[Cherry-pick] Add bump version script; Make version release more automated #4521
Conversation
… more automate Signed-off-by: JesseStutler <chenzicong4@huawei.com>
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.
Summary of Changes
Hello @JesseStutler, 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!
I've implemented changes to automate the version bumping process for release branches, moving away from hardcoded version tags. This involves introducing a new script to manage version updates across various configuration files and build processes, as well as refining existing scripts to support this dynamic versioning. The goal is to make the release process more automated and less error-prone.
Highlights
- Automated Version Bumping Script: I've introduced a new shell script,
hack/bump-version.sh
, designed to fully automate the process of bumping the project's version. This script updates all relevant files, including.release-version
, Helm chart files (Chart.yaml
,values.yaml
), and thego.mod
file, ensuring consistency across the codebase. It also handles the generation of updated development YAMLs and can even create a GitHub pull request for the version bump. - Dynamic Versioning in Makefiles: I've updated the
Makefile
andMakefile.def
to remove hardcoded version tags. Instead, they now dynamically fetch the current Git SHA or use theTAG
environment variable, making the build and release process more flexible and less prone to manual errors. This change specifically impacts howgenerate-yaml
andupdate-development-yaml
targets operate. - Improved YAML Consistency Checks: The
hack/check-generated-yaml.sh
script has been significantly enhanced to intelligently compare generated YAML files. It now includes logic to handle different versioning schemes, such as comparinglatest
tags in development files against specific prerelease versions, ensuring that the generated YAMLs are always consistent with the intended release tag. - Centralized Release Version File: A new file,
.release-version
, has been added to centralize the storage of the current release version. This file will be managed by the newbump-version.sh
script, providing a single source of truth for the project's version. - Simplified Monitoring Installation Instructions: I've updated the
README.md
to reflect the new, more streamlined process for installing the monitoring dashboard. The instructions now leverage the automated YAML generation, removing the need for manualmake
commands with specific tags.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
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 .gemini/
folder in the base of the repository. Detailed instructions can be found here.
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 or fill out our survey to provide feedback.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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, hack/bump-version.sh
, to automate the process of version bumping for releases. The changes across the Makefiles and YAML generation scripts effectively replace hardcoded version strings with dynamic variables, which is a significant improvement for maintainability and automation. The new bump-version.sh
script is well-structured, incorporating best practices like error handling and a cleanup mechanism. My review includes one high-severity suggestion to enhance the script's robustness by using idiomatic Go commands for dependency management.
/cc @Monokaix |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Monokaix The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
We need to automatically bump version for release branch, currently all the TAGs in release branch are hard-coded
Which issue(s) this PR fixes:
Cherry-pick from #4372
Special notes for your reviewer:
Does this PR introduce a user-facing change?