Skip to content

Improve script robustness with set -euo pipefail#2214

Open
rauldsl wants to merge 2 commits intoNVIDIA:mainfrom
rauldsl:gpu-operator-nvaie.sh
Open

Improve script robustness with set -euo pipefail#2214
rauldsl wants to merge 2 commits intoNVIDIA:mainfrom
rauldsl:gpu-operator-nvaie.sh

Conversation

@rauldsl
Copy link
Contributor

@rauldsl rauldsl commented Mar 17, 2026

Description

Enable set -euo pipefail in the GPU Operator NVAIE installation script to improve robustness.
This ensures the script:

  • Exits immediately on any command failure (-e)
  • Detects use of unset variables (-u)
  • Fails if any command in a pipeline fails (-o pipefail)

This change reduces the risk of partial or inconsistent deployments during installation.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing

Tested manually by running the script on a cluster with an existing GPU Operator namespace, verifying that:

  • The script exits immediately if a required environment variable is missing
  • The script stops if any kubectl or helm command fails
  • Existing resources are handled correctly without partial creation

@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 17, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant