Repository navigation
chore(kokoro): handle missing flakybot and codecov scripts gracefully - #14793
sakthivelmanii wants to merge 7 commits into
Conversation
Kokoro integration jobs often share common install configurations. When run in jobs that don't declare gfile_resources for flakybot and codecov.sh (like directpath or java8), the build.sh script would fail when attempting to chmod or run these missing files. This adds existence checks before execution.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates .kokoro/build.sh to check for the existence of codecov.sh and flakybot before execution. The review feedback suggests using double brackets [[ ... ]] for safer Bash evaluation and checking if KOKORO_GFILE_DIR is set and non-empty to prevent unbound variable errors.
There was a problem hiding this comment.
Code Review
This pull request updates the .kokoro/build.sh script to ensure that codecov.sh and the flakybot binary exist before attempting to execute them. The review feedback suggests a robust improvement to handle cases where the KOKORO_GFILE_DIR environment variable is undefined, which would cause the script to crash under set -u (nounset) mode. It is recommended to check if KOKORO_GFILE_DIR is non-empty before checking for the files.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates .kokoro/build.sh to add safety checks ensuring that KOKORO_GFILE_DIR is set and the target scripts/binaries (codecov.sh and flakybot) exist before attempting to execute them. The feedback suggests combining the chained [[ ... ]] conditions into single [[ ... ]] blocks using the && operator for better readability and idiomatic Bash style.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates .kokoro/build.sh to ensure that KOKORO_GFILE_DIR is defined and the target files (codecov.sh and flakybot) exist before executing them. The review feedback suggests using the fallback syntax ${KOKORO_GFILE_DIR:-} in the file existence checks to avoid potential unbound variable errors under set -u.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the build script to check for the existence of codecov.sh and flakybot before execution. The review comments suggest adding warning logs when these tools are enabled but their files are missing, which prevents silent failures and improves CI observability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request improves the robustness of .kokoro/build.sh by checking for the existence of codecov.sh and the flakybot binary in KOKORO_GFILE_DIR before attempting to execute them, and by using double brackets [[ for conditional checks. The review feedback recommends double-quoting the ${KOKORO_GFILE_DIR} variable expansions to prevent potential word splitting or globbing issues.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request improves the robustness of the .kokoro/build.sh script by adding checks to verify the existence of codecov.sh and the flakybot binary before executing them, along with proper variable quoting. Feedback suggests appending || true to the chmod +x command for flakybot to prevent potential build failures in environments where the filesystem is mounted as read-only.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the .kokoro/build.sh script to add safety checks verifying that KOKORO_GFILE_DIR is defined and that the codecov.sh and flakybot files exist before attempting to run them. It also adds warning messages if these files are missing and improves shell syntax and variable quoting. There are no review comments, and I have no additional feedback to provide.
Pull request was closed
Kokoro integration jobs often share common install configurations. When run in jobs that don't declare
gfile_resourcesforflakybotandcodecov.sh(like directpath or java8), thebuild.shscript fails when attempting tochmodor run these missing files. This adds existence checks before execution to gracefully skip them.