Repository navigation
chore(kokoro): add Maven timeouts to prevent macOS VM hangs - #14899
sakthivelmanii wants to merge 9 commits into
Conversation
Injects Aether and Wagon read timeouts into MAVEN_OPTS inside retry_with_backoff to fail fast on Maven Central hangs instead of blocking for 3 hours.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM hangs. The review feedback recommends refining the command matching logic to support Maven wrappers (mvnw), avoid false positives, and prevent MAVEN_OPTS from growing indefinitely on repeated invocations.
There was a problem hiding this comment.
Code Review
This pull request introduces defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM hangs. The review feedback suggests a more robust way to detect Maven commands by checking the executable name (the first element of the command array) rather than searching the entire command string, which avoids false positives/negatives. Additionally, it recommends checking if the timeout options are already present in MAVEN_OPTS before appending them to prevent accumulation over multiple calls.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces defensive timeouts and retry configurations to Maven commands in '.kokoro/common.sh' to prevent Kokoro VM hangs. The reviewer suggests using the '${MAVEN_OPTS:-}' parameter expansion syntax to ensure robustness against unbound variable errors when 'set -u' is enabled.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM timeouts. The reviewer suggested using a cleaner bash parameter expansion to avoid introducing a leading space in MAVEN_OPTS when it is initially unset or empty.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM hangs. The feedback suggests also adding Wagon-specific timeout properties (maven.wagon.rto and maven.wagon.connectionTimeout) to MAVEN_OPTS to ensure that Wagon-based plugins, which do not use Aether, are also covered.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM hangs. The feedback suggests using ${command[0]:-} instead of ${command[0]} to avoid potential 'unbound variable' errors under set -u when the command array is empty.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM timeouts. The review feedback suggests simplifying the multiple OR conditions used to detect Maven commands by using a regular expression match.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds defensive timeouts to Maven commands in .kokoro/common.sh to prevent Kokoro VM hangs. The feedback suggests storing the regular expression in a local variable to ensure compatibility with older Bash versions, such as Bash 3.2 on macOS.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces defensive timeouts to Maven commands in '.kokoro/common.sh' to prevent Kokoro VM timeouts. The feedback suggests using 'local -x' instead of 'export' to scope the modified 'MAVEN_OPTS' to the function and splitting the long string into multiple lines to improve readability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates .kokoro/common.sh to inject defensive timeout and retry configuration options into MAVEN_OPTS when executing Maven commands (mvn or mvnw). This is designed to prevent long-running hangs and VM timeouts during Kokoro builds. There are no review comments, and I have no additional feedback to provide on these changes.
|
Closing this PR as we will configure Maven HTTP timeouts in our Spanner CI runner script instead of modifying the shared monorepo script. |
Problem
java8-osxbuild fails withERROR: Aborting VM command due to timeout of 10800 seconds.nexus-staging-maven-plugin, etc.) occasionally hangs on macOS runners.mvn installcommand can block indefinitely (hanging for > 2 hours), leading to the 3-hour Kokoro VM hard timeout without triggering theretry_with_backofflogic.Solution
-Daether.connector.requestTimeout=300000,-Daether.connector.connectTimeout=30000, etc.) intoMAVEN_OPTSbefore executingmvn installwithinretry_with_backoff.