-
Notifications
You must be signed in to change notification settings - Fork 102
feat: Document release process in RELEASE.md #560
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @kabir, 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 significantly enhances the project's release management by introducing a robust, documented, and largely automated process. It includes a new script for consistent version updates across Maven POMs and JBang dependencies, a validation mechanism to prevent version mismatches, and a comprehensive Highlights
Ignored Files
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
|
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 PR does a great job of documenting the release process and adding automation to make it smoother. The RELEASE.md is very detailed and the scripts for version updates and validation are a great addition. I've found a few issues, including a bug in the argument parsing of the update-version.sh script, a minor inconsistency in the new RELEASE.md, a typo in a Javadoc, and some potentially confusing code in the groovy script and root pom.xml. Addressing these will improve the robustness and clarity of the new release tooling.
e1b11ee to
ad829fd
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 comprehensive and well-documented release process, which is an excellent addition for project maintainability. The new scripts for version updates and validation are valuable. My review highlights a critical issue in pom.xml where versions were incorrectly modified, a high-severity bug in the update-version.sh script that likely caused this, and several medium-severity suggestions to enhance the robustness of the scripts and the clarity of the documentation.
f785bc8 to
0bc889d
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 comprehensive release process documentation (RELEASE.md) and supporting automation scripts. This includes a script to update versions across pom.xml and JBang files (update-version.sh), and a Groovy script to validate JBang dependency versions during the Maven build (validate-jbang-versions.groovy). The Maven configuration is updated accordingly to integrate these scripts.
The changes are well-structured and significantly improve the release workflow. The documentation is clear and detailed. I have a couple of suggestions to improve the robustness of the validation script and maintainability of the documentation.
|
/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 documented release process along with automation scripts to streamline version updates and validation. The changes are well-structured, with a new RELEASE.md file, a bash script for version bumping, and a Groovy script for validation. My review focuses on improving the robustness and maintainability of the new scripts and documentation. I've suggested making the version parsing in the Groovy script safer, improving path resolution in the POM file to be less fragile, and aligning the verification steps between the documentation and the helper script. I also pointed out a minor security concern regarding an email address in the documentation.
| def actualVersion = line.substring(lastColon + 1).trim().tokenize()[0] | ||
| if (actualVersion != expectedVersion) { | ||
| System.err.println("[ERROR] JBang Version Mismatch in " + scriptName) | ||
| System.err.println(" Expected: " + expectedVersion) | ||
| System.err.println(" Found: " + actualVersion + " in line: \"" + line.trim() + "\"") | ||
| success = false | ||
| } |
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.
The current version parsing logic is a bit fragile. If a line ends with a colon or has only whitespace after it, tokenize()[0] will throw an ArrayIndexOutOfBoundsException, causing the build to fail with a potentially unclear stack trace. A more robust approach would handle this case gracefully and provide a more informative error message.
def actualVersion = line.substring(lastColon + 1).trim().tokenize().find()
if (actualVersion != expectedVersion) {
System.err.println("[ERROR] JBang Version Mismatch in " + scriptName)
System.err.println(" Expected: " + expectedVersion)
System.err.println(" Found: " + (actualVersion ?: "<missing>") + " in line: \"" + line.trim() + "\"")
success = false
}
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.
@gemini-code-assist this was your idea. Come up with a final solution. We should be able to extract the version no matter what!
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.
You're right, tokenize() can be a bit too broad if there are non-whitespace characters immediately following the version that aren't part of the version string itself (e.g., a comma or another delimiter). To make the version extraction truly robust and handle cases like //DEPS io.github.a2asdk:artifact-id:1.0.0, some-other-info or //DEPS io.github.a2asdk:artifact-id:1.0.0-SNAPSHOT//comment, a regular expression is a more precise tool.
This updated suggestion uses a regex to explicitly capture the version string, which typically consists of alphanumeric characters, dots, and hyphens, from the beginning of the trimmed string after the last colon. It also retains the graceful handling of missing versions by printing <missing>.
| def actualVersion = line.substring(lastColon + 1).trim().tokenize()[0] | |
| if (actualVersion != expectedVersion) { | |
| System.err.println("[ERROR] JBang Version Mismatch in " + scriptName) | |
| System.err.println(" Expected: " + expectedVersion) | |
| System.err.println(" Found: " + actualVersion + " in line: \"" + line.trim() + "\"") | |
| success = false | |
| } | |
| def versionPart = line.substring(lastColon + 1).trim() | |
| def matcher = (versionPart =~ /^([0-9a-zA-Z.-]+)/) | |
| def actualVersion = matcher.find() ? matcher.group(1) : null | |
| if (actualVersion != expectedVersion) { | |
| System.err.println("[ERROR] JBang Version Mismatch in " + scriptName) | |
| System.err.println(" Expected: " + expectedVersion) | |
| System.err.println(" Found: " + (actualVersion ?: "<missing>") + " in line: \"" + line.trim() + "\"") | |
| success = false | |
| } |
| def actualVersion = line.substring(lastColon + 1).trim().tokenize()[0] | |
| if (actualVersion != expectedVersion) { | |
| System.err.println("[ERROR] JBang Version Mismatch in " + scriptName) | |
| System.err.println(" Expected: " + expectedVersion) | |
| System.err.println(" Found: " + actualVersion + " in line: \"" + line.trim() + "\"") | |
| success = false | |
| } | |
| def versionPart = line.substring(lastColon + 1).trim() | |
| def matcher = (versionPart =~ /^([0-9a-zA-Z.-]+)/) | |
| def actualVersion = matcher.find() ? matcher.group(1) : null | |
| if (actualVersion != expectedVersion) { | |
| System.err.println("[ERROR] JBang Version Mismatch in " + scriptName) | |
| System.err.println(" Expected: " + expectedVersion) | |
| System.err.println(" Found: " + (actualVersion ?: "<missing>") + " in line: \"" + line.trim() + "\"") | |
| success = false | |
| } |
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.
OTOH we don't have that many JBang scripts - we should just not write confusing DEPS
1f1c66d to
7636def
Compare
- Add script to update versions - Add checks to make sure the JBang version is in sync with pom versions - Add workflow to create GH release
7636def to
b4305b0
Compare
Fixes #532 🦕