Skip to content

Commit 57879bd

Browse files
UPSTREAM: <carry>: Increase install timeout and add diagnostic logging for CE install tests
With BoxcutterRuntime, Installed=True is only set after all availability probes pass, which can take longer on TechPreview clusters (IPv6, multi-arch). Increases install-specific timeout from 5m to 10m and logs condition state on each poll to aid debugging flaky failures.
1 parent ea1ea19 commit 57879bd

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

openshift/tests-extension/pkg/helpers/cluster_extension.go

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ func NewClusterExtensionObject(pkg, version, ceName, saName, namespace string, o
142142
}
143143

144144
// ExpectClusterExtensionToBeInstalled checks that the ClusterExtension has both Progressing=True and Installed=True.
145+
// Uses InstallTimeout because the BoxcutterRuntime requires all availability probes to pass
146+
// before marking the extension as installed.
145147
func ExpectClusterExtensionToBeInstalled(ctx context.Context, name string) {
146148
k8sClient := env.Get().K8sClient
147149
Eventually(func(g Gomega) {
@@ -153,13 +155,30 @@ func ExpectClusterExtensionToBeInstalled(ctx context.Context, name string) {
153155
g.Expect(conditions).NotTo(BeEmpty(), fmt.Sprintf("ClusterExtension %q has empty status.conditions", name))
154156

155157
progressing := meta.FindStatusCondition(conditions, string(olmv1.TypeProgressing))
158+
installed := meta.FindStatusCondition(conditions, string(olmv1.TypeInstalled))
159+
160+
pStatus, pReason, pMsg := conditionSummary(progressing)
161+
iStatus, iReason, iMsg := conditionSummary(installed)
162+
fmt.Fprintf(GinkgoWriter, "CE %q: Progressing=%s/%s (%s), Installed=%s/%s (%s)\n",
163+
name, pStatus, pReason, pMsg, iStatus, iReason, iMsg)
164+
156165
g.Expect(progressing).ToNot(BeNil(), "Progressing condition not found")
157166
g.Expect(progressing.Status).To(Equal(metav1.ConditionTrue), "Progressing should be True")
158167

159-
installed := meta.FindStatusCondition(conditions, string(olmv1.TypeInstalled))
160168
g.Expect(installed).ToNot(BeNil(), "Installed condition not found")
161169
g.Expect(installed.Status).To(Equal(metav1.ConditionTrue), "Installed should be True")
162-
}).WithTimeout(DefaultTimeout).WithPolling(DefaultPolling).Should(Succeed())
170+
}).WithTimeout(InstallTimeout).WithPolling(DefaultPolling).Should(Succeed())
171+
}
172+
173+
func conditionSummary(cond *metav1.Condition) (string, string, string) {
174+
if cond == nil {
175+
return "<nil>", "", ""
176+
}
177+
msg = cond.Message
178+
if len(msg) > 120 {
179+
msg = msg[:120] + "..."
180+
}
181+
return string(cond.Status), cond.Reason, msg
163182
}
164183

165184
// EnsureCleanupClusterExtension attempts to delete any ClusterExtension and a specified CRD

openshift/tests-extension/pkg/helpers/defaults.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ const (
1414
// DefaultTimeout is how long we wait before giving up on an Eventually check.
1515
DefaultTimeout = 5 * time.Minute
1616

17+
// InstallTimeout is how long we wait for an operator to be fully installed.
18+
// With the BoxcutterRuntime, Installed=True is only set after all availability
19+
// probes pass (Deployments available, CRDs established, etc.), which can take
20+
// longer than DefaultTimeout on resource-constrained or non-standard clusters.
21+
InstallTimeout = 10 * time.Minute
22+
1723
// DefaultPolling is how often we check again during an Eventually test.
1824
DefaultPolling = 3 * time.Second
1925
)

0 commit comments

Comments
 (0)