Skip to content

Deprecate the Knative/KEDA deployment path (ADR-0041) - #485

Merged
pdettori merged 9 commits into
rossoctl:mainfrom
pdettori:knative-deprecation-signals
Oct 12, 2026
Merged

pdettori merged 9 commits into
rossoctl:mainfrom
pdettori:knative-deprecation-signals

Conversation

@pdettori

@pdettori pdettori commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Deprecate the Knative/KEDA deployment path (ADR-0041)

Implements the ADR-0041 rollout: the record itself, the runtime and docs signals, and the RA1 §10.3 audit that gates labeling. Planned as two stacked PRs (docs, then signals); with neither opened yet, both ride here together in order.

The record

  • ADR-0041 (docs/adrs/0041-deprecate-knative-keda-deployment.md): the Knative + KEDA deployment model — the Knative Service, KEDA ScaledJobs, KubectlTransport, pod-exec sandboxes, deploy/knative/ — is deprecated as of 2026-10-11. Security and breakage fixes only; removal no earlier than end of October 2026, and only once the remaining users have confirmed migration. Scope is ADR-0037's: the deployment model, not Kubernetes as a substrate (deploy/k8s/ is a first-class migration destination) and not containers as a sandbox technology. Status flips on the superseded ADRs and specs.
  • docs/migrating-from-knative.md: the user-facing migration guide.

The signals

  • packages/knative-server/src/deprecation.ts — single source of the notice text, guarded by Knative env detection (K_SERVICE/K_CONFIGURATION/K_REVISION).
  • server.ts startServer() warns once at boot — only under Knative Serving.
  • leaf-job.ts (the KEDA drainer) warns unconditionally — that entrypoint only ever runs as a KEDA ScaledJob, so there is no P6 path to protect.
  • cron-dispatch.ts (the CronJob on-ramp) warns unconditionally as the first statement of main() — same safety argument: it only ever runs as deploy/knative/leaf-cron.yaml's CronJob. (Added in the review fix pass — the CronJob pod restarts on every schedule, so its logs are the one channel that repeatedly reaches a scheduled-dispatch-only operator.)
  • Banners under the title of all six deploy/knative/ guides; stderr notices in all four setup scripts (setup-kind.sh, setup-ocp.sh, setup-k8s.sh, mocactl-quickstart.sh), printed before anything else so a script that dies on prerequisites has already said why it is deprecated.

The P6-silence invariant

The P6 supervisor forks knative-server/src/worker.ts without Knative env vars, so that shared code must never emit the warning. The guard is the env vars, never the entrypoint. Pinned by packages/knative-server/test/deprecation.test.ts: worker.ts never imports deprecation.js, the server wiring sits inside startServer() (anchored before prepareServerProcess), and a spawned leaf-job prints the notice before its first boot refusal.

The RA1 §10.3 audit

worker.ts vs supervisor/src/pool.ts compared hunk-by-hunk (356 vs 468 lines, 423/311): the only literal duplication is the two IPC unions, deliberate per spec §9 and drift-protected by real-worker.integration.test.ts; every worker-side export is the child half of a deliberate parent/child split, none Knative-specific. No missing behavior found — knative-server keeps entry-point labels only (leaf-job.ts); the package stays unlabeled. Recorded as ADR-0041's first Revisions entry.

Verification

  • make lint — exit 0
  • make typecheck — exit 0
  • make test-deploy — exit 0
  • packages/knative-server — 512/512 tests across 34 files (local Redis), including the review fix pass

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

RA1 Phase 4, the record its §8 item 4 called for: as of 2026-10-11 the
Knative Service, KEDA ScaledJobs, KubectlTransport and pod-exec sandboxes
(deploy/knative/) are deprecated, not removed. P6 is the primary runtime;
capacity scales by adding process-manager pods or sizing them up. The
window is security and breakage fixes only; removal comes no earlier than
April 2027, once remaining users have migrated.

- add docs/migrating-from-knative.md: destinations (deploy/vm, deploy/k8s,
  deploy/compose), the Knative-to-P6 mapping, the scaling model, what
  carries over, and the honest gaps (async leaf dispatch, CronJob on-ramp)
- supersede ADRs 0002/0003/0004/0009/0015/0018/0019/0023 and - with
  concern-preserving wording - 0017/0025/0027; supersede the eight
  Knative-path specs (m2, m3, m4, m7, async-leaf, scheduled-leaf, P0',
  P3)
- update the ADR index and the RA1 registry row (Phase 4 executing)

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
The deciders plan to move faster than the original April 2027 floor, so
removal is now planned no earlier than end of October 2026 - still only
once the remaining Knative users have confirmed migration. Updated in the
ADR's Decision and both places in the migration guide.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
…ripts

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Review finding on PR 485: cron-dispatch.ts is the third deprecated-path runtime entrypoint and was the only silent one. Unconditional first-statement warning in main(), same as the KEDA drainer — this entrypoint only ever runs as deploy/knative/leaf-cron.yaml's CronJob, so no P6 path is affected.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>

@ingpaolodettori-dev ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A clean, well-scoped deprecation. The new head (b923522) adds the third runtime warning: cron-dispatch.ts now prints KNATIVE_DEPRECATION_NOTICE as the first statement of main(), before loadConfig can throw. That's correct. main() sits behind the exact isMainModule guard, so cron-dispatch.test.ts's imports of the pure helpers stay silent. The entrypoint runs only from deploy/knative/leaf-cron.yaml, so no P6 path is affected. deprecation.ts has no imports, so the CronJob picks up no new dependencies. The new test pins both the notice and its order ahead of the crash line on the missing-config fast-exit path.

Earlier checks still hold, because no other file changed since 84ef6e1. startServer() warns only under K_SERVICE/K_CONFIGURATION/K_REVISION. The P6 supervisor forks worker.ts, which never calls startServer and never imports deprecation.js. The setup-script banners come after set -euo pipefail. Every path linked from the migration guide exists.

Still open: the migration guide's call to action points at GitHub Discussions, which are disabled on this repo. There are also three small ADR nits, one of them new: the labeling decision doesn't mention cron-dispatch.ts's new @deprecated header.

Author: pdettori (MEMBER — maintainer)
Areas reviewed: TypeScript (knative-server), tests, Shell (deploy/knative setup scripts), Docs (ADR-0041, migration guide)
Agent/IDE config (.claude/.vscode): none
Commits: 9 commits, all signed-off: yes
CI status: passing (check, lint, proto, deploy-scripts, k8s-kind-e2e, microvm-gates, shellcheck, hadolint, CodeQL, Trivy, trivy-scan, dependency-review, DCO)

> is the primary way to run MOCA sessions. During the window the old path receives security and
> breakage fixes only, and no new features. Removal comes no earlier than **end of October
> 2026**, and only once its remaining users have migrated — if that is you, say so in a
> [GitHub discussion](https://github.com/rossoctl/moca/discussions) so the date can account for

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — GitHub Discussions are disabled on rossoctl/moca (has_discussions: false), so this link and the two others (line 56's "say so in the migration discussion", line 107's "Tell us when you have moved") lead nowhere. That matters more than a usual dead link, because removal is gated on the remaining users confirming migration, and this is the only channel the guide gives them. Either enable Discussions before merge, or point all three at a pinned tracking issue (e.g. "Knative/KEDA migration: tell us you've moved"). ADR-0041's Decision section could link the same place.

path, `deploy/knative/` banners, setup-script notices, README/CLAUDE.md/Makefile/Dockerfile/
`build.yaml` relabeling, demo rewrites — lands in follow-up PRs on this branch.
- Follow-up owed: RA1 §10.3's diff of `knative-server/src/worker.ts` against the supervisor's
`pool.ts` (468 vs 356 lines, ~775 diff lines at the time of this decision) must be reviewed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — "468 vs 356 lines" reads as worker.ts=468, pool.ts=356, but they're the other way round (wc -l: worker.ts 356, pool.ts 468), and the Revisions entry below and the PR body both say worker.ts 356 / pool.ts 468. Suggest "(356 vs 468 lines, …)".

depending on them cannot finish migrating until that lands.
- Follow-up owed: the rollout this record authorizes — a runtime startup warning on the deprecated
path, `deploy/knative/` banners, setup-script notices, README/CLAUDE.md/Makefile/Dockerfile/
`build.yaml` relabeling, demo rewrites — lands in follow-up PRs on this branch.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — "lands in follow-up PRs on this branch": the rollout is landing in this PR and stacked #486, and an accepted ADR will outlive the branch. Suggest "lands in follow-up PRs (#485, #486)" or just "in follow-up PRs".

halves of one deliberately-duplicated protocol, not a fork with silent drift.

**Labeling decision:** no missing behavior was found, so `knative-server` keeps entry-point
deprecation labels only — `leaf-job.ts` carries the `@deprecated` header; `worker.ts` and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — Since b923522, cron-dispatch.ts carries an @deprecated header too, so this sentence now undercounts the labeled entrypoints. Suggest "leaf-job.ts and cron-dispatch.ts carry the @deprecated header" (and "three entrypoint warnings" wherever the rollout is summarized).

@pdettori
pdettori merged commit 96cdb18 into rossoctl:main Oct 12, 2026
14 checks passed
@pdettori
pdettori deleted the knative-deprecation-signals branch October 12, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants