Skip to content

Upgrade notes: stop every 2.1 instance before the first 2.2.0 one starts - #809

Merged
schmitch merged 1 commit into
mainfrom
claude/788-upgrade-notes-stop-2-1
Nov 2, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/788-upgrade-notes-stop-2-1

Conversation

@schmitch

@schmitch schmitch commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fixes #788

Problem

docs/deployment.md (Upgrades) says "a release that needs something other than a rolling restart says so there". 2.2.0's notes did not. With the chart's default RollingUpdate, the 2.1 instances that still serve after the first 2.2.0 instance has migrated go wrong in three ways:

  • Credential-forwarding sign-ins fail on them. 2.2.0 always writes accept_client_passwords into a credential-forwarding realm's config. The [auth.upstream_basic] seed does so at the first start (crates/server/src/auth/realms.rs:1538-1567). 2.1 parses realm rows with deny_unknown_fields and skips one it cannot read (v2.1.0 realms.rs:849-860), so its users get 401 there.
  • A 2.1 retention worker deletes glob-protected tags. 2.1 compares protected_tags literally (v2.1.0 crates/core/src/retention/images.rs:219, :900, :906), so release-* protects nothing. It also ignores the package delay's per-package overrides.
  • Accounts they create or set to Reader get no reader role. Migration 0013 gives the role once (migrations/0013_reader_role.sql:57-68), so such an account reads nothing on 2.2.0.

Change

A new fragment, docs/changes/2.2.0/788.upgrade.md, worded like 2.1.0's note for 2.0.0 (#615). It says to stop every 2.1 instance before the first 2.2.0 instance starts, and how:

  • the Helm chart: --set strategy.type=Recreate, or scale to zero;
  • the Kubernetes manifests: scale the forge deployment to zero.

It names the three effects, and what to check in Admin → Users after an upgrade that rolled.

#764 (0011's lock on component, and 0007's rename failing 2.1 imports during a rolling restart) is left to its own pull request, per AGENTS.md. Stopping the 2.1 instances first also avoids the 0007 effect.

cargo xtask changelog --check passes.


Generated by Claude Code

docs/deployment.md lets a release say when it needs more than a rolling
restart, and 2.2.0's notes did not. While 2.1 instances still serve after
the first 2.2.0 instance has migrated:

- they skip a credential-forwarding realm 2.2.0 has rewritten with
  `accept_client_passwords` (the [auth.upstream_basic] seed does so at
  the first start), since 2.1 parses realm rows with deny_unknown_fields,
  and its users get 401 there;
- a policy saved on 2.2.0 with a glob in `protected_tags`, run by a 2.1
  worker, deletes the tags the glob protects, and 2.1 ignores the
  package delay's per-package overrides;
- an account they create or set to Reader gets no built-in `reader`
  role, which migration 0013 gave once, so it reads nothing on 2.2.0.

The note says to stop every 2.1 instance first, as 2.1.0's did for 2.0.0
(#615), how to with the chart and the manifests, and what to check after
an upgrade that rolled.

Fixes #788

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJc1H3748D8sheqhKTV
@schmitch
schmitch added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 964288c Nov 2, 2026
18 checks passed
@schmitch
schmitch deleted the claude/788-upgrade-notes-stop-2-1 branch November 2, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants