feat(testing): cut over daily test suite to Kueue scheduling - #6014
feat(testing): cut over daily test suite to Kueue scheduling#6014sudheer-quad wants to merge 2 commits into
Conversation
Summary of ChangesHello, 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 migrates the slurm-gcp-v6-rocky-8 daily test suite to use Kueue for job scheduling within the hpc-toolkit-dev-2 project. The changes involve replacing the legacy build process with a containerized job execution model that leverages Kueue for queue management, retry logic, and better resource utilization. Additionally, the infrastructure code has been updated to support these new triggers and scheduling requirements. Highlights
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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the slurm-gcp-v6-rocky8 daily integration test to run as a GKE Kueue job, introducing scripts to monitor Kueue jobs, wait for zone capacity, and check for retriable errors, alongside updating the Terraform provisioning configurations. Feedback on these changes highlights several issues: missing secret environment variables in the job manifest generation step, a lack of file existence verification in the retriable error check script, a missing set -e inside the subshell of the zone availability script, and the potential for the newly added backup file slurm-gcp-v6-rocky8_old.yaml to be accidentally discovered and scheduled by automated test scripts.
| name: gcr.io/cloud-builders/gcloud | ||
| script: "tools/cloud-build/check_running_build.sh tools/cloud-build/daily-tests/builds/slurm-gcp-v6-rocky8.yaml" | ||
| entrypoint: /bin/bash | ||
| secretEnv: ['GCLUSTER_GCS_PATH', 'SA_EMAIL'] |
There was a problem hiding this comment.
The generate-job-manifest step references several triage environment variables (e.g., $$TRIAGE_GCS_BUCKET, $$TRIAGE_PROJECT_NUMBER, $$TRIAGE_INVOKER_SA, $$TRIAGE_CLOUD_RUN_URL) inside the cat <<EOF block. Because these variables are not included in the secretEnv list for this step, they will expand to empty strings when generating job.yaml.
Please add these secret environment variables to the generate-job-manifest step.
secretEnv: ['GCLUSTER_GCS_PATH', 'SA_EMAIL', 'TRIAGE_GCS_BUCKET', 'TRIAGE_PROJECT_NUMBER', 'TRIAGE_INVOKER_SA', 'TRIAGE_CLOUD_RUN_URL']| LOG_FILE=$1 | ||
| if [ -z "$LOG_FILE" ]; then | ||
| echo "Usage: $0 <log_file>" >&2 | ||
| exit 2 | ||
| fi |
There was a problem hiding this comment.
The script does not verify if the log file actually exists and is readable before running grep. If the file is missing or unreadable, grep will output an error to stderr and exit with status 2, which might be confusing or cause unexpected behavior in the calling pipeline.
Please add a check to ensure the file exists and is a regular file.
| LOG_FILE=$1 | |
| if [ -z "$LOG_FILE" ]; then | |
| echo "Usage: $0 <log_file>" >&2 | |
| exit 2 | |
| fi | |
| LOG_FILE=$1 | |
| if [ -z "$LOG_FILE" ]; then | |
| echo "Usage: $0 <log_file>" >&2 | |
| exit 2 | |
| fi | |
| if [ ! -f "$LOG_FILE" ]; then | |
| echo "Error: Log file '$LOG_FILE' does not exist or is not a regular file." >&2 | |
| exit 2 | |
| fi |
| ( | ||
| source /workspace/tools/cloud-build/find_available_zone.sh | ||
| # If it succeeds, these lines will execute and save the exports. | ||
| echo "export ZONE=${ZONE}" >/tmp/zone_export.sh | ||
| echo "export PROVISIONING_MODEL=${PROVISIONING_MODEL}" >>/tmp/zone_export.sh | ||
| ) 2>&1 | tee /tmp/zone_output.log |
There was a problem hiding this comment.
Inside the subshell, set -e is not explicitly enabled because set +e was called on the parent shell at line 22. If find_available_zone.sh does not internally set set -e and encounters a non-fatal command failure, the subshell will continue executing and write empty or incomplete values to /tmp/zone_export.sh, exiting with status 0.
Additionally, it is safer to double-quote the exported variables to prevent any potential word splitting or shell expansion issues.
Please enable set -e explicitly inside the subshell and quote the exported values.
| ( | |
| source /workspace/tools/cloud-build/find_available_zone.sh | |
| # If it succeeds, these lines will execute and save the exports. | |
| echo "export ZONE=${ZONE}" >/tmp/zone_export.sh | |
| echo "export PROVISIONING_MODEL=${PROVISIONING_MODEL}" >>/tmp/zone_export.sh | |
| ) 2>&1 | tee /tmp/zone_output.log | |
| ( | |
| set -e | |
| source /workspace/tools/cloud-build/find_available_zone.sh | |
| # If it succeeds, these lines will execute and save the exports. | |
| echo "export ZONE=\"${ZONE}\"" >/tmp/zone_export.sh | |
| echo "export PROVISIONING_MODEL=\"${PROVISIONING_MODEL}\"" >>/tmp/zone_export.sh | |
| ) 2>&1 | tee /tmp/zone_output.log |
This PR transitions the slurm-gcp-v6-rocky-8 daily test suite to Kueue scheduling in the hpc-toolkit-dev-2 project.
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.