Repository navigation
Description
Describe the bug
The install-readiness helper can report success after its polling deadline or after a parser failure. Its timeout also does not bound a blocked subprocess.
Environment
I reproduced the failures offline in Bash; no cluster was involved. The tested source is cb3fcd335779558f34e9ab39f28f6860548a6e51. The tests replace kubectl, jq, date and sleep with PATH-provided mocks.
To Reproduce
Source hack/e2e-wait-helmreleases.sh in a shell without errexit and use one HelmRelease whose observed generation matches its metadata generation.
- Call
cozy_wait_all_helmreleases_ready 30 1 5 2. Return Ready=True on both polls, with the clock at 0 for the first result and 40 for the second. - Call
cozy_wait_all_helmreleases_ready 30 1 2 2. Inject exit 5 from only the Stalled jq query while the snapshot has Ready=True and Stalled=True. Repeat independently, failing only the not-ready query with a Ready=False snapshot.
Expected behaviour
Late results and parser errors fail the readiness check. A wall-clock bound, if required by a caller, covers subprocesses and final diagnostics too.
Actual behaviour
The success branch precedes the deadline check. The Stalled and not-ready assignments do not check jq's status, so empty failed output is treated as no matching releases. Errexit can stop an unconditional invocation, but conditional callers suppress that protection.
There is also no process-level deadline. The per-request timeout does not bound client-go's synchronous credential-plugin execution. That mechanism was checked in source; I did not run a real credential plugin.
Logs
late Ready: timeout=30, result at t=40 -> exit 0
Stalled query: injected jq exit 5 -> helper exit 0
not-ready query: injected jq exit 5 -> helper exit 0
Screenshots
Not applicable.
Additional context
These failures already exist on the base branch. The manual example in #4859 uses errexit, but the helper still needs explicit error handling independent of its caller. A fix should add regression coverage and update the documented timeout limits.
Checklist
- I have checked the documentation
- I have searched for similar issues
- I have included all required information
- I have provided clear steps to reproduce
- I have included relevant logs
Activity
dosubot commentedon Nov 8, 2026
The existing regression suite is
hack/helmrelease-readiness.bats. Its “a read slower than the poll interval is charged against the deadline” case returns a not-ready snapshot and checks only the number of kubectl calls; it discards the helper’s exit status with|| true. So that test does not establish that a late Ready result fails. The suite already has mocked-clock and conditional-invocation examples to build on. [1]There is also an in-tree process-timeout precedent:
_cozy_guard_kubectlinhack/e2e-chainsaw/_lib/run-kubernetes.shcombinestimeout -kwith--request-timeout, explicitly distinguishing the process wall-clock bound from the HTTP request bound. Its fallback is unbounded whentimeoutis unavailable, so it is a useful reference, not by itself a strict whole-helper deadline. [2]To reply, just mention @dosu.
Docs are dead. Just use Dosu.