tests/k8s-deployment-control/run-test.sh cannot run against the current CLI, and no CI workflow runs it, so the rot went unnoticed. It nominally covers k8s scheduling behaviour — node affinities, tolerations, and asserting the pod lands on the expected node — which nothing else in the suite covers today.
What is broken
Every stack invocation in it uses a CLI shape that no longer exists:
| line |
script uses |
current CLI |
| 70 |
stack fetch repositories --stack test |
only stack fetch repo |
| 71 |
stack build containers --stack test |
still valid |
| 79 |
stack --stack test deploy --deploy-to k8s-kind init --output ... |
no global --stack, no init subcommand under deploy, no --deploy-to on deploy; it is now stack init --stack ... --deploy-to ... |
| 88 |
stack --stack test deploy --spec-file ... --deployment-dir ... |
no global --stack |
It also waits on a string the product never prints:
if [[ "$ps_output" == *"Running containers:"* ]]; then
ps_operation (src/stack/deploy/deploy.py) prints id: <id>, name: <name>, ports: ..., so wait_for_pods_started can only ever spin for its full 50 × 5s and then fail. The other tests match id:.
Why it went unnoticed
There is no .github/workflows/ job that runs this test. Every other bash suite has one (test-deploy, test-deploy-k8s, test-database, test-backup, test-skill, test-static-content, test-webapp, test).
Suggested resolution
The scheduling assertions are worth keeping, but a standalone unrunnable test is worse than none — it reads as coverage that does not exist. Options, roughly in order of preference:
- Fold the affinity/toleration cases into
tests/k8s-deploy/run-deploy-test.sh (which did not exist in its current form when this test was written) as an extra phase, so they run in the existing K8S Deploy Test job. Note that test's kind cluster is single-node, so the multi-node kind-config.yml this test writes would need to go somewhere the k8s test can opt into.
- Port it to the current CLI and give it its own workflow.
- Delete it, and open a separate issue for the missing scheduling coverage.
Context
Found while consolidating duplicated code out of the bash test scripts into tests/lib/common.sh. That refactor deliberately skipped this file rather than polish a script that cannot run — the shared wait_for_containers_started helper matches id:, which would have masked the breakage by making the wait loop pass while the rest of the script still failed.
tests/k8s-deployment-control/run-test.shcannot run against the current CLI, and no CI workflow runs it, so the rot went unnoticed. It nominally covers k8s scheduling behaviour — node affinities, tolerations, and asserting the pod lands on the expected node — which nothing else in the suite covers today.What is broken
Every
stackinvocation in it uses a CLI shape that no longer exists:stack fetch repositories --stack teststack fetch repostack build containers --stack teststack --stack test deploy --deploy-to k8s-kind init --output ...--stack, noinitsubcommand underdeploy, no--deploy-toondeploy; it is nowstack init --stack ... --deploy-to ...stack --stack test deploy --spec-file ... --deployment-dir ...--stackIt also waits on a string the product never prints:
ps_operation(src/stack/deploy/deploy.py) printsid: <id>, name: <name>, ports: ..., sowait_for_pods_startedcan only ever spin for its full 50 × 5s and then fail. The other tests matchid:.Why it went unnoticed
There is no
.github/workflows/job that runs this test. Every other bash suite has one (test-deploy,test-deploy-k8s,test-database,test-backup,test-skill,test-static-content,test-webapp,test).Suggested resolution
The scheduling assertions are worth keeping, but a standalone unrunnable test is worse than none — it reads as coverage that does not exist. Options, roughly in order of preference:
tests/k8s-deploy/run-deploy-test.sh(which did not exist in its current form when this test was written) as an extra phase, so they run in the existingK8S Deploy Testjob. Note that test's kind cluster is single-node, so the multi-nodekind-config.ymlthis test writes would need to go somewhere the k8s test can opt into.Context
Found while consolidating duplicated code out of the bash test scripts into
tests/lib/common.sh. That refactor deliberately skipped this file rather than polish a script that cannot run — the sharedwait_for_containers_startedhelper matchesid:, which would have masked the breakage by making the wait loop pass while the rest of the script still failed.