Skip to content

Commit a7a0611

Browse files
test(e2e): consolidate tenant child-HR waits into one budgeted assert
The bats step had two waits for tenant-root child HRs: kubectl wait hr/etcd hr/ingress hr/tenant-root hr/seaweedfs --timeout=4m kubectl wait hr/monitoring hr/seaweedfs-system --timeout=2m The second line was the residue of a flux-reconcile-force workaround removed in 7d292eb; the mechanical cleanup kept the same HRs on a separate 2m wait without revisiting whether the line still made sense. After PR #2509 fixed the underlying timing bug: - monitoring is a top-level tenant-root child, identical shape to etcd and ingress; its Ready is already implied by hr/tenant-root Ready on the first line. - seaweedfs-system is an internal HR of the seaweedfs umbrella chart; its Ready is already implied by hr/seaweedfs Ready on the first line. So the second wait was always tautologically true by the time it ran, and the naming inconsistency (top-level monitoring next to internal seaweedfs-system) was an accident of the historical workaround. Promote monitoring to the first line where it belongs and drop the redundant second wait. Also bump the wait from 4m to 10m. seaweedfs now installs as a serial chain seaweedfs-db (CNPG bootstrap) -> seaweedfs-system (raft quorum) -> seaweedfs wrapper, so the parent tenant-root HR's Ready flip lags ~5-6 min. The previous 4m budget was sized for the old single-HR seaweedfs and is the immediate cause of the e2e failure on PR #2619. The 10m budget stays inside tenant-root HR.spec.timeout (15m). Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]> (cherry picked from commit df65b0a)
1 parent 037b862 commit a7a0611

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎hack/e2e-install-cozystack.bats‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,15 @@ EOF
141141
kubectl patch tenants/root -n tenant-root --type merge -p '{"spec":{"host":"example.org","ingress":true,"monitoring":true,"etcd":true,"isolated":true, "seaweedfs": true}}'
142142

143143
timeout 60 sh -ec 'until kubectl get hr -n tenant-root etcd ingress monitoring seaweedfs tenant-root >/dev/null 2>&1; do sleep 1; done'
144-
kubectl wait hr/etcd hr/ingress hr/tenant-root hr/seaweedfs -n tenant-root --timeout=4m --for=condition=ready
145-
146-
kubectl wait hr/monitoring hr/seaweedfs-system -n tenant-root --timeout=2m --for=condition=ready
144+
# tenant-root parent HR only flips Ready after every child HR is Ready,
145+
# so listing all four top-level children plus the parent gives precise
146+
# failure messages without redundant separate waits. seaweedfs now
147+
# installs as a serial chain seaweedfs-db (CNPG bootstrap) ->
148+
# seaweedfs-system (master raft quorum) -> seaweedfs wrapper, which
149+
# pushes the parent's Ready flip to ~5-6 min; tenant-root HR.spec.timeout
150+
# is 15m and this 10m wait stays inside it.
151+
kubectl wait hr/etcd hr/ingress hr/monitoring hr/seaweedfs hr/tenant-root \
152+
-n tenant-root --timeout=10m --for=condition=ready
147153

148154

149155
# Expose Cozystack services through ingress

0 commit comments

Comments
 (0)