Skip to content

Improve script robustness with set -euo pipefail#2214

Open
rauldsl wants to merge 1 commit intoNVIDIA:mainfrom
rauldsl:gpu-operator-nvaie.sh
Open

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

Conversation

@rauldsl
Copy link
Copy Markdown
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 Markdown

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.

Signed-off-by: Raul Leite <sp4wn.root@gmail.com>
@rauldsl rauldsl force-pushed the gpu-operator-nvaie.sh branch from bf9735e to 3d489e6 Compare April 12, 2026 04:22
@rauldsl
Copy link
Copy Markdown
Contributor Author

rauldsl commented Apr 12, 2026

Just refreshed the PR with a clean rebase and removed an unrelated commit.
The change now only includes the intended fix. Ready for review again, tks!!! /lgtm

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