fix(release): handle missing release tags gracefully in release-note-generation#13795
fix(release): handle missing release tags gracefully in release-note-generation#13795jinseopkim0 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to verify the existence of monorepo releases using the GitHub CLI, allowing for dynamic construction of release URLs. The code review identified potential issues with process stream management and improper handling of InterruptedException. I have kept the comments regarding the need to consume process streams to prevent blocking and the correct handling of thread interruption, as well as the suggestion to capture the error stream when a command fails to provide more meaningful diagnostic information.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a check to verify if a monorepo release exists using the GitHub CLI (gh) and adjusts the release URL format accordingly. It also refactors fetchReleaseNote to redirect process output to a temporary file and handle command failures gracefully. The review feedback suggests adding a timeout to the process execution in releaseExists to prevent potential indefinite blocking, and cleaning up the temporary file in fetchReleaseNote immediately within a finally block rather than relying on deleteOnExit().
d9c0b6a to
ca2b1ff
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a check to verify if a monorepo release exists using the GitHub CLI, dynamically adjusting the release URL format based on the result. It also refactors fetchReleaseNote to redirect process output to a temporary file to prevent potential blocking and handles command failures gracefully. The review feedback highlights potential process leaks in both releaseExists and fetchReleaseNote if the threads are interrupted while waiting for the subprocesses to finish, and suggests wrapping the process execution in try-finally blocks to ensure the subprocesses are forcibly destroyed if they remain alive.
ca2b1ff to
2737d53
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates ReleaseNoteGeneration.java to dynamically check for the existence of monorepo releases using the GitHub CLI (gh) and adjusts release URLs accordingly. It also refactors fetchReleaseNote to redirect command output to a temporary file and handle failures gracefully. Feedback on this PR highlights that silently returning an empty string on any command failure in fetchReleaseNote could mask critical issues like authentication or network errors; it is recommended to only ignore "not found" errors and throw an exception for other failures.
2737d53 to
dbef66b
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a check to verify if a monorepo release exists using the GitHub CLI (gh), dynamically formatting the release URL based on the result. It also refactors fetchReleaseNote to use a temporary file for output and gracefully handle missing releases. The feedback suggests propagating IOException in releaseExists to avoid masking environment issues (such as a missing gh CLI) and waiting for the process to fully terminate after calling destroyForcibly() to ensure the temporary file is reliably deleted.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds a check to verify if a monorepo release exists using the GitHub CLI and dynamically formats the release URL based on its existence. It also refactors fetchReleaseNote to write output to a temporary file and handle missing releases gracefully. The review feedback recommends using java.nio.file.Files.createTempFile instead of File.createTempFile to ensure secure file permissions on POSIX-compliant systems.
… ReleaseNoteGeneration
dbef66b to
0bae71c
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates ReleaseNoteGeneration.java to check if a monorepo release exists using the GitHub CLI (gh) and adjusts the generated release URLs accordingly. It also updates fetchReleaseNote to handle missing releases gracefully. A review comment points out that ProcessBuilder.Redirect.DISCARD is used in releaseExists, which requires Java 9+, whereas the project targets Java 8 compatibility. It suggests redirecting output to a temporary file instead.
This PR updates the release note generation tool to:
v1.88.1-dataproc) for partial releases to avoid broken links.Tested manually with
-Dlibraries-bom.version=26.85.1 -Dgoogle-cloud-java.version=1.88.1(verified correct tag fallback output in release_note.md).Fixes b/535634855