GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(migrations): preserve legacy deployer intent after undeploy by Elvand-Lie · Pull Request #4076 · knative/func

Conversation

@Elvand-Lie

@Elvand-Lie Elvand-Lie commented Oct 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #4054

Legacy func.yaml files stored the selected deployer only under deploy.deployer. func delete clears that deployment state, so the next deploy fell back to the configured default instead of the deployer the function was using.

Add a 0.40.0 migration, after the 0.39.0 one from #4167, that recovers the missing top-level deployer intent from deploy.deployer. Explicit intent always wins, and observed state is left untouched.

Changes

  • Add migrateDeployerIntent at spec version 0.40.0 in pkg/functions/function_migrations.go
  • Add TestMigrateDeployerIntent for 0.39.0 and legacy 0.36.0 files, a namespace without a deployer (knative from fix: on-cluster deploys fall back to the default deployer #4167), and explicit-intent and no-deployer controls
  • Add TestDelete_LegacyDeployerForRedeploy for CLI delete then redeploy with raw, KEDA and Knative, the global default, and flag and env overrides

Files already at 0.40.0 or later that only carry observed deployer state are outside this migration's scope.

/kind bug

Testing

go test -race ./pkg/functions/ ./cmd/ -count=1    # PASS

The recovery cases fail without the migration and pass with it; the control cases pass on both.

Release Note

Legacy functions retain their selected deployer after delete and redeploy instead of falling back to the configured default.

Docs


Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow knative-prow Bot added the kind/cleanup Cleanup label Oct 11, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos October 11, 2026 13:26
@knative-prow knative-prow Bot added size/XS 🤖 PR changes 0-9 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Oct 11, 2026
@knative-prow

knative-prow Bot commented Oct 11, 2026

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Elvand-Lie Elvand-Lie changed the title test(functions): make funcignore comment test deterministic fix(migrations): preserve legacy deployer intent after undeploy Oct 11, 2026
@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. and removed size/XS 🤖 PR changes 0-9 lines, ignoring generated files. labels Oct 11, 2026
@Elvand-Lie
Elvand-Lie force-pushed the test/fingerprint-comment-mtime branch from c1bc926 to d193619 Compare October 30, 2026 14:25
@Elvand-Lie

Elvand-Lie commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main and dropped the fingerprint test change, since #4084 fixed that test upstream. This PR is now only the #4054 migration.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow-robot knative-prow-robot added the needs-rebase Cannot be merged due to conflicts with HEAD. label Nov 19, 2026
@Elvand-Lie
fix(migrations): recover legacy deployer intent at 0.40.0
34cc994
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

Signed-off-by: Elvand Lie Nababan <[email protected]>
@Elvand-Lie
Elvand-Lie force-pushed the test/fingerprint-comment-mtime branch from d193619 to 34cc994 Compare November 19, 2026 12:27
@knative-prow-robot knative-prow-robot removed the needs-rebase Cannot be merged due to conflicts with HEAD. label Nov 19, 2026
@lkingland

lkingland commented Nov 24, 2026

Copy link
Copy Markdown
Member

Thanks @Elvand-Lie. Filling only missing intent from deploy.deployer, after the 0.39.0 knative backfill, fixes the delete-then-redeploy path without changing plain redeploys. Nice coverage on the CLI side.

/ok-to-test
/lgtm
/approve

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned lkingland Nov 24, 2026
@knative-prow knative-prow Bot added ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. lgtm 🤖 PR is ready to be merged. and removed needs-ok-to-test 🤖 Needs an org member to approve testing labels Nov 24, 2026
@knative-prow

knative-prow Bot commented Nov 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Elvand-Lie, lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [lkingland]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label Nov 24, 2026
@knative-prow
knative-prow Bot merged commit a145594 into knative:main Nov 24, 2026
72 of 73 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dsimansk dsimansk Awaiting requested review from dsimansk
@jrangelramos jrangelramos Awaiting requested review from jrangelramos

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lkingland lkingland

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/cleanup Cleanup lgtm 🤖 PR is ready to be merged. ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Legacy deploy.deployer-only functions lose deployer intent on func delete then func deploy

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Elvand-Lie @lkingland @knative-prow-robot
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.