Repository navigation
Description
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Low
Please provide a clear description of problem this feature solves
#70 gives every cluster_base Verifier its own 30-second deadline (verifyTimeout in internal/controller/ip/cclclusterconfig_controller.go). The deadline is cooperative: context.WithTimeout only cancels the context, and verify then waits for every Verifier goroutine with wg.Wait().
A Verifier that blocks without honouring ctx.Done(), for example on a channel or a library call that takes no context, keeps wg.Wait() from returning. The pass never finishes, the Verified condition is never written, and the controller stalls on the CCLClusterConfig singleton instead of reporting that chart as timed out (#70 (comment)).
Today this is handled by contract: catalogs.Verifier requires an implementation to return once ctx is done. Every Verifier is still DefaultVerifier, so there is no exposure yet. The risk grows as the real checks in #91 land.
Describe your ideal solution
Have the controller enforce the deadline rather than rely on each Verifier:
- Run each Verifier behind a result channel and
selecton its result versus the deadline. - When the deadline wins, report the chart as
timed out after 30sand stop waiting for it. - Keep results deterministic in catalog order, and keep the panic recovery.
Describe any alternatives you have considered
- Keep the cooperative deadline and the contract (current behaviour): no leaked goroutines, but one non-compliant Verifier can stall verification. Acceptable while every Verifier is reviewed in-repo code.
- Review-time enforcement only: check in review that each Verifier passes
ctxto its calls and checks it in its own loops. Cheap, but easy to miss for a library call that ignores context.
Additional context
Trade-offs to settle when implementing:
- Leaked goroutines: Go cannot stop a goroutine from outside. An abandoned Verifier keeps running, and a Verifier stuck forever adds one goroutine per pass (every minute while failing). Consider skipping a chart whose previous call is still running and reporting it as still running, rather than starting another call.
- Data race: the result slice is written by position today. A late writer must not touch results after
verifyhas returned. Send results over buffered channels instead. - Testing: an envtest spec with a Verifier that ignores
ctxneeds a deadline shorter than 30s. Either expose the timeout to tests or testverifywith an injected deadline.
Modules affected: internal/controller/ip, catalogs/verify.go (contract wording), DESIGN.md §3a.
Activity
linear commentedon Oct 7, 2026
CCLOS-15