Skip to content

Conversation

JesseStutler
Copy link
Member

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?


… more automate

Signed-off-by: JesseStutler <chenzicong4@huawei.com>
@volcano-sh-bot volcano-sh-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 8, 2025
@volcano-sh-bot volcano-sh-bot requested review from k82cn and Yikun August 8, 2025 03:41
Copy link

@gemini-code-assist gemini-code-assist bot left a 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 the go.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 and Makefile.def to remove hardcoded version tags. Instead, they now dynamically fetch the current Git SHA or use the TAG environment variable, making the build and release process more flexible and less prone to manual errors. This change specifically impacts how generate-yaml and update-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 comparing latest 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 new bump-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 manual make 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

  1. 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.

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 8, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

@JesseStutler
Copy link
Member Author

/cc @Monokaix

@volcano-sh-bot volcano-sh-bot requested a review from Monokaix August 8, 2025 03:43
@Monokaix
Copy link
Member

Monokaix commented Aug 8, 2025

/approve

@volcano-sh-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2025
@hwdef
Copy link
Member

hwdef commented Aug 8, 2025

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2025
@volcano-sh-bot volcano-sh-bot merged commit f9dd793 into volcano-sh:release-1.12 Aug 8, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants