fix(infra): render CONVOY_RETENTION_POLICY independently of retention_policy.enabled - #93
Merged
mekilis merged 1 commit intoAug 13, 2026
Conversation
….enabled Both retention env vars sat behind retention_policy.enabled, but the server stopped reading that flag for partition retention: deletion is gated on the license alone, while enabled now gates archiving and backup only. An operator who set a custom duration and left enabled false had the duration dropped from the pod spec, so a licensed instance deleted at the server's own 720h default instead of the configured value. The duration is wrapped in `with` rather than rendered unconditionally, because an empty value is worse than an absent one: the worker runs time.ParseDuration on it and returns an error, so an empty policy would stop the pod booting instead of falling back to the default. CONVOY_RETENTION_POLICY_ENABLED now renders in both states rather than only when true. Behaviour is identical today, since absent and false both resolve to false, but the rendered manifest states what it means and cannot drift if the server default changes. extraEnvs still renders after this block in all four templates and Kubernetes takes the last duplicate, so anyone working around this with extraEnvs today keeps their override. Values comments record that enabled does not stop deletion, which is the reading that produced the wrong configuration in the first place. They are plain comments, not helm-docs directives, so README.md stays valid without regenerating it.
|
Current version of PR was reviewed by /review-bugbot on Aug 13, 14:51 GMT+1. It flagged 0 findings. Bugbot on commit |
mekilis
deleted the
smart/pde-988-helm-render-retention-policy-independently
branch
August 13, 2026 14:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both retention env vars sat behind
retention_policy.enabled, but the server stopped reading that flag for partition retention. Deletion is gated on the license alone, whileenablednow gates archiving and backup only. An operator who set a custom duration and leftenabledfalse had the duration dropped from the pod spec, so a licensed instance deleted at the server's own 720h default instead of the configured value. Silent, and in the wrong direction: history goes away sooner than configured.The duration is wrapped in
withrather than rendered unconditionally, because an empty value is worse than an absent one. The worker runstime.ParseDurationon it and returns an error, so an empty policy would stop the pod booting instead of falling back to the default.CONVOY_RETENTION_POLICY_ENABLEDnow renders in both states rather than only when true. Behaviour is identical today, since absent and false both resolve to false, but the rendered manifest states what it means and cannot drift if the server default changes.extraEnvsstill renders after this block in all four templates and Kubernetes takes the last duplicate, so anyone working around this withextraEnvstoday keeps their override.Values comments record that
enableddoes not stop deletion, which is the reading that produced the wrong configuration in the first place. They are plain comments rather than helm-docs directives, soREADME.mdstays valid without regenerating it.No chart version bump, following the convention that release prep is its own PR.
Test plan
helm lintpasses on all three charts andscripts/verify-redis-sentinel-template.shreports OK.Rendered for server and agent, over both the deployment and rollout paths:
enabled=falsewithpolicy=2160hnow emits the duration, which is the bug this fixes:policyomits the var entirely rather than sending"", so the pod still boots and the server default applies:Renders are otherwise byte-identical to
mainapart from the pod annotation Helm stamps on every render.