Repository navigation
fix(migrations): preserve legacy deployer intent after undeploy - #4076
Elvand-Lie wants to merge 1 commit into
Conversation
|
Hi @Elvand-Lie. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Legacy func.yaml files stored the chosen deployer only in observed state. Deleting clears that state, causing redeploy to fall back to the configured default. Recover missing top-level intent during migration while preserving explicit intent and observed state. Exercise real YAML loading and CLI delete, reload and redeploy for legacy 0.36.0 and 0.38.0 files, all deployers, global defaults, and flag and environment overrides. Keep plain redeploy as a control. Fixes knative#4054 Assisted-by: OpenAI Codex and Claude Code Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
c1bc926 to
d193619
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Elvand-Lie 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 |
Fixes #4054
Legacy
func.yamlfiles stored the selected deployer only underdeploy.deployer.func deleteclears that deployment state, so the next deploy fell back to the configured default instead of the deployer the function was using.Add a 0.39.0 migration that recovers the missing top-level
deployerintent fromdeploy.deployer. Explicit intent always wins, and observed state is left untouched.Changes
migrateDeployerIntentat spec version 0.39.0 inpkg/functions/function_migrations.goTestMigrateDeployerIntentfor 0.38.0 and legacy 0.36.0 files, with explicit-intent and no-deployer controlsTestDelete_LegacyDeployerForRedeployfor CLI delete then redeploy with raw, KEDA and Knative, the global default, and flag and env overridesFiles already at 0.39.0 or later that only carry observed deployer state are outside this migration's scope.
/kind bug
Testing
The recovery cases fail without the migration and pass with it; the control cases pass on both.
Release Note
Docs