Repository navigation
feat(chart): render worker.startupProbe - #788
Conversation
Render worker.startupProbe like the readiness and liveness probes, and fail rendering if a probe of the worker isn't a map or has more than one handler or none (foca-common.checkWorkerProbes, moved from proTES's protes.checkWorkerProbes). The schema accepts null for the worker probes and says so: Helm merges values into an app chart's default probes, so null turns one off. Closes #786 Co-Authored-By: Claude Opus 5.5 <[email protected]>
A handler counts when it is set and not null, so an empty httpGet merged into a default exec probe is caught; a handler that isn't a map fails. The release notes list the new check under breaking changes, as it also applies to values of a disabled worker. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideAPIExtend the common and Petstore values schemas to accept nullable worker probes and include
ImplementationAdd validation for worker probe shapes and handler counts, including probes on disabled workers, and render
ConfigurationAdd empty
DocumentationDocument worker startup probes, Helm merge behavior, and the new validation and release-note entries.
TestsCover probe rendering and defaults, null and empty values, Helm-merged handlers, validation failures, and schema behavior.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #788 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 75 75
Lines 10025 10025
=========================================
Hits 10025 10025
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linked issuesChecked at commit 506b428 #786 feat(chart): render worker.startupProbe · 2 of 2 met
|
Summary
worker.startupProbe: foca-common renders it like the readiness and liveness probes (verbatim, none if empty ornull), and the schema has it.null, and their descriptions say "null for none": app charts such as proTES set default probes, and Helm merges values into them, sonullturns one off (an empty map changes nothing).protes.checkWorkerProbes(protes#505) is now in the library asfoca-common.checkWorkerProbes, included byfoca-common.validate. Rendering fails if a worker probe or one of its handlers isn't a map, or if a probe has more than one handler (set and not null, e.g.,tcpSocketmerged into a defaultexec) or none (e.g., onlyexec: nullover a default). Kubernetes would refuse all of these. Like in proTES, the check also runs when the worker is disabled. It is skipped for app charts withoutworkervalues.startupProbe: {}, and the petstore schema copy is updated.docs/helm-chart.mdcovers the worker's probes, and the values table listsstartupProbe. The 0.6.0 notes for the unreleased chart get a breaking-change entry for the check (it also covers leftover values of a disabled worker) and a feature entry. The chart version stays 0.6.0.A draft follow-up issue for proTES to adopt this after a foca-common release is kept locally and is not posted.
Verification
pytest charts/foca-common/tests tests/test_version_mentions.py tests/test_release_notes.py: 757 passed (Helm 3.22.1).helm lint --stricton foca-common, on petstore with eachci/*-values.yaml, and on gateway withci/test-values.yaml: all pass.ruff check,ruff format --check,mypy(no issues),ast-grep scan,semgrep scan --config .semgrep --errorandmkdocs build --strictall pass.chart-installkind job. CI ran it and passed, along with all other CI checks (gateCI passed, Chart, Chart install, Lint, Test matrix, CodeQL, codecov), on 506b428.adversarial-reviewerandquality-reviewer. Round 1 found one medium (the release notes) and lows; all are fixed except those under "Declined review findings". The handler counting changed, so round 2 ran the adversarial reviewer only.Declined review findings
PINGis a module-level dict shared by the tests. Kept: nothing mutates it, and the file already uses module-level constants the same way (e.g.,CELERY_ENV).Open questions
None.
Closes #786
🤖 Generated with Claude Code
Summary by Sourcery
Support configurable and validated startup, readiness, and liveness probes for Celery workers.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: