Repository navigation
feat: list no backend parameters in service info - #314
Conversation
From tesk-api 2.0.0 on, the chart's service info has tesResources_backend_parameters: [] (TES 1.1): TESK supports no backend parameters. Earlier tesk-api releases can't read the service info with the field, so it is left out for them, as type.version follows the API's tag too. Closes #289 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Say that the backend parameters field is optional in an own ConfigMap and must not be added for tesk-api 1.x, that the chart's ConfigMap change restarts the API, and that tags that aren't versions need tesk-api images built after tesk-api#147 (review findings). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideConfigurationAdd the TES 1.1 empty backend-parameters field to chart-generated service info only for tesk-api 2.0.0 and later, and document the chart-managed behavior in the values comment.
DocumentationExplain when the field is emitted, its compatibility constraints for older and non-version-tagged API images, and how it applies to user-managed ConfigMaps and upgrades.
TestsUpdate service-info expectations and test that backend parameters are listed for supported API tags but omitted for earlier releases.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
The 0.4.0 notes gain the service info's backend parameters (#289, #314) and the prerelease flag of releases before 1.0 (#313, #315), both planned for 0.4.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #314 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 422 422
=========================================
Hits 422 422 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 865ed0c #289 feat: report TES 1.1.0 in service info · 4 of 4 met
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="charts/tesk/templates/_helpers.tpl" line_range="528" />
<code_context>
{{- end }}
{{- end }}
+{{- if empty (include "tesk.apiBefore" (dict "root" . "version" "2.0.0")) }}
+tesResources_backend_parameters: []
+{{- end }}
{{- end -}}
</code_context>
<issue_to_address>
**Old API serves empty service info**
When a Helm upgrade updates the ConfigMap while a 1.x API pod is still running and the pod reads the updated ConfigMap, the old API cannot parse the new `tesResources_backend_parameters` key, so it serves empty service info until the pod or ConfigMap is replaced; if the upgrade stops after the ConfigMap update, this persists until retry or rollback.
Keep the new key out of ConfigMaps still consumed by 1.x pods, for example by switching to a versioned ConfigMap after those pods are replaced.
Also at `charts/tesk/templates/_helpers.tpl:529`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: charts/tesk/templates/_helpers.tpl:528
Summary
Finishes #289: #309 already made the chart report TES
1.1.0and bumped the default images; what was left is the TES 1.1 fieldtesResources_backend_parameters.charts/tesk/templates/_helpers.tpl(tesk.serviceInfo): from tesk-api 2.0.0 on (also its pre-releases and tags that aren't versions, the same condition astype.version), the service info liststesResources_backend_parameters: []: TESK supports no backend parameters. tesk-api 1.x reads the file with plain SnakeYAML and can't load the unknown key (it would serve an empty service info), so the field is left out for it. tesk-api 2.0.0 reads it (substituteProperty) and always serves[].tests/test_chart.py): newtest_service_info_backend_parameters(present for 2.0.0,v2.0.0, 2.0.0-rc.1, 2.1.0,dev; absent for 1.2.0,v1.2.1);test_service_info_defaultsandtest_service_info_optionalupdated. The new test failed before the template change.values.yamlcomment.Closes #289
Verification
REQUIRE_HELM=1 pytest(Helm 3.22.1): 917 passed and 2 failed (test_service_info_optional, which lists the service info's fields); after updating that test,pytest -k service_info: 76 passedhelm lint charts/tesk --strict: passedmypy tests: no issues;mkdocs build --strict: passedpre-commit run --all-files: passed exceptactionlint, which couldn't run locally (tool shim without a version; no workflow changed here)CI: all checks passed (gate
CI passed, Chart install, Test, Docs, Release readiness, CodeQL, Read the Docs).Lane
Full lane (chart template logic):
adversarial-reviewerandquality-reviewer, one round (no high or medium correctness findings; the quality reviewer's two medium findings were docs only and are fixed).Declined review findings
type.versionand the new field (low): two short uses of the same helper,tesk.apiBefore, which holds the threshold logic; a variable would save nothing.test_service_info_type_versionand the new test (low): the two lists check different things and read clearly as they are.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Add TES 1.1 backend-parameter reporting to service info for tesk-api 2.0.0 and later while preserving compatibility with older API versions.
New Features:
Enhancements:
Documentation:
Tests: