You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI: run the deploy bash suites under bash 3.2 (macOS /bin/bash), and make the harnesses use the bash they were launched with #440
Follow-up from #437, P6 on Kubernetes slice 2 (#424).
What: the bash test suites never run setup.sh, smoke.sh or setup-microvm.sh under bash 3.2, the stock macOS /bin/bash that operators run deploy/k8s/setup.sh with for kind on macOS.
Why it matters:
Slice 2 shipped one regression that broke every setup.sh run on bash 3.2: "${arr[@]}" on an empty array under set -u. It was caught only in review.
deploy/k8s/tests/setup.test.sh runs the script with REAL_BASH="$(command -v bash)", which is the first bash on PATH (Homebrew 5.x on a dev Mac, 5.x on ubuntu CI). So even /bin/bash deploy/k8s/tests/setup.test.sh tests bash 5.
The reviewers ran the suites with PATH=/bin:$PATH by hand, and they passed.
Fix:
Make the harnesses use the bash they were launched with: REAL_BASH="${BASH:-$(command -v bash)}" in setup.test.sh, and the same in smoke.test.sh and setup-microvm.test.sh where they spawn bash.
Add a CI job on macos-latest that runs /bin/bash deploy/k8s/tests/setup.test.sh, smoke.test.sh and deploy/microvm/tests/setup-microvm.test.sh, with jq, openssl and shellcheck installed as needed.
Activity
ci: run the deploy bash suites under bash 3.2 on macOS