fix(operator): stop forwarding duplicate spec/uid on healthcheck rerun - #2429
fix(operator): stop forwarding duplicate spec/uid on healthcheck rerun#2429Minh141120 wants to merge 1 commit into
Conversation
The rerun handler forwards to the create handler with spec and uid both as named arguments and inside **kwargs, which kopf also populates. Every rerun raised TypeError, so holmesgpt.dev/rerun=true never re-executed a check and kopf retried the handler on a 60s backoff indefinitely. Filter the two colliding keys before forwarding. The rest of kwargs is kept because the create handler reads body from it to attach events. Signed-off-by: Minh141120 <minh.itptit@gmail.com>
|
|
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe healthcheck update handler now removes duplicated ChangesHealthcheck rerun handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change restores health-check reruns by removing duplicate arguments while preserving no-op behavior for unchanged annotations. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
holmesgpt.dev/rerun=truenever re-executes a HealthCheck.The update handler forwards to the create handler with
specanduidboth as named arguments and inside**kwargs- which kopf also populates — so every attempt raises:kopf then retries the handler on a 60s backoff indefinitely. Fixing only
specsurfaces the same error foruid, so both are filtered. The remaining kwargs are still forwarded, because the create handler readsbodyfrom them to attach events to the resource.Observed on
robustadev/holmes-operator:0.40.0; the code path is unchanged onmaster.Reproduce
HealthCheckand let it completekubectl annotate healthcheck <name> holmesgpt.dev/rerun=trueTypeError, andkopf.zalando.org/on_healthcheck_updateon the resource accumulates"retries"with"success": falseTests
Two regression tests: one asserting the rerun re-executes the check, one asserting an unchanged annotation stays a no-op. The first fails with
TypeErroronmasterand passes with this change;pytest tests/holmes_operatoris 26 passed.Summary by CodeRabbit