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
Commit 4d7d336
Browse filesBrowse the repository at this point in the historyBrowse files
fix(e2e): tell a failed pool existence read from an absent pool release
The failure-path report checked the pool release with `get hr -o name`
and discarded the exit status and stderr, so a timeout, a kill, a
Forbidden or a refused connection all printed that the run ended before
the worker pool was applied. That is the conflation the guard wrapper
exists to refuse, on the path where a slow apiserver is most likely.
Read it with --ignore-not-found instead: exit 0 with empty output is an
absent release, exit 0 with a name is one to classify, and any non-zero
exit is a failed read named through _cozy_guard_read_failure.
The pool reads also skipped the report's own deadline and checked only
the phase clock, which says yes on every path that opens no phase.
Check the deadline before the existence read, like the listing and the
addons do, and name what was not read.
The stub's ABSENT marker now answers the flag the way kubectl does. New
cases pin the failed read and the deadline; the two budget cases are
re-timed for the extra clock reading.
Signed-off-by: Marian Koreniuk <[email protected]>
Assisted-by: LLM
echo"=== HelmRelease remediation footprint: stopped after ${_budget}s; ${_pool} and the addon releases of ${_parent} were not read, so nothing was observed about any of them ===">&2
5571
+
return 0
5572
+
fi
5573
+
_cozy_guard_read_bounds
5574
+
_read_rc=0
5575
+
_pool_found=$(_cozy_guard_kubectl get hr -n "$_ns""${_pool}" --ignore-not-found -o name)|| _read_rc=$?
5576
+
if [ "${_read_rc}"-ne 0 ];then
5577
+
echo"Checking whether ${_pool} exists failed - $(_cozy_guard_read_failure "${_read_rc}"); nothing was observed about it either way.">&2
5578
+
elif [ -z"${_pool_found}" ];then
5569
5579
echo"» ${_pool} does not exist - the run ended before the worker pool was applied, or its HelmRelease was never created; nothing to read"
echo"expected the parent to have been classified before the budget ran out, got: $out">&2
497
+
exit 1
498
+
fi
499
+
if grep -q -F 'kubernetes-nodes-test-latest-version-md0'"$FIXTURES/CALLS";then
500
+
echo"expected no read of the pool release once the budget was spent, calls were: $(cat "$FIXTURES/CALLS")">&2
501
+
exit 1
502
+
fi
503
+
if!printf'%s\n'"$out"| grep -q -F 'stopped after 90s; kubernetes-nodes-test-latest-version-md0 and the addon releases of kubernetes-test-latest-version were not read';then
504
+
echo"expected the skipped pool release to be named, got: $out">&2
505
+
exit 1
506
+
fi
507
+
508
+
rm -rf "$tmp"
509
+
}
510
+
414
511
@test "single-release guard fails a RetryOnFailure release that failed and recovered" {
415
512
# The entry point the parent kubernetes-<test> release goes through, and the
416
513
# shape the rule exists for. The apiserver stamps RetryOnFailure on every
0 commit comments