OTA-2064: Tolerate unknown template fields during payload loading#1421
OTA-2064: Tolerate unknown template fields during payload loading#1421jhadvig wants to merge 1 commit into
Conversation
Make template rendering errors non-fatal during LoadUpdate. When an older CVO binary loads a newer payload that uses template fields the older binary does not know about (e.g. .Images added in 5.0), the manifest is skipped with a warning instead of failing the entire payload load. The new CVO binary will re-load the full payload after it replaces the old one at run-level 0. Without this fix, 4.22→5.0 major upgrades fail with ReleaseAccepted=False because the 4.22 CVO cannot render 5.0 manifests that reference .Images. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@jhadvig: This pull request references OTA-2064 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jhadvig The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@jhadvig: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
LoadUpdateWhy
Backport of the tolerance logic from PR #1410 (5.0). Without this, 4.22→5.0 major upgrades are blocked: the 4.22 CVO tries to render 5.0 manifests that use
{{index .Images "..."}}, fails because.Imagesdoesn't exist in the 4.22manifestRenderConfig, and setsReleaseAccepted=False.With this fix, the 4.22 CVO skips unrenderable manifests with a warning. The new 5.0 CVO re-loads the full payload after it replaces the old one at run-level 0, correctly rendering all manifests.
This was one of two issues that caused the revert of CVO#1398 and blocked 5.0 nightly payloads for 69+ hours (TRT-2776).
Test plan
TestLoadUpdateSkipsUnknownTemplateFieldsverifies manifests with unknown template fields are skipped while valid manifests are loaded🤖 Generated with Claude Code