Repository navigation
Description
What's the problem
Config version migration is Bash, part of slices 22 to 30. Operators on older config versions are the main risk of the config-layer port: a migration that differs by one byte changes a live config on upgrade. No parity file exists that feeds every supported older version to both implementations.
What it impacts
Every upgrade from an older config version, on DIY and on the appliance, and the refusal path for a config newer than the code (the case seen in #4373).
How I found it
Parent #4221 under tracker #3811: go-port/3811 has go/internal/config with tagged parity groups and a Bash fallback. The parent allows parse and validate to flip separately from migrations. Unknown: the list of supported older versions (it must come from the Bash migration table) and whether the parse and validate child has merged. If not, this waits on it.
How important is it
Medium, with the highest care in the config-layer port: bad migration handling breaks setup for existing owners.
Acceptance criteria
- Version migrations run in Go when their selector position chooses Go, and can flip separately from parse and validate. Bash stays reachable and stays the default until every criterion holds.
- A new parity file feeds every supported older config version to Go and to Bash and compares the migrated output and the exit status byte for byte.
- The parity test fails when a version in the Bash migration table is missing from the parity file.
- A config newer than the code is refused with identical output and status in both.
- File mode, ownership and backup behaviour of the migrated file are the same as Bash; a test asserts it.
- The existing config suites pass unchanged in both positions. No Bash function is removed.
-
make test,make test-patch-coverageandmake lint-file-budgetpass. - Tier: tiers 1 to 3 in both positions, and one tier-4 job on the PR head that performs a real migration from an older config with Go selected. The PR names the leg it used (for example the provision migration leg).
Possible solutions
- Harvest the migration files from
go/internal/config; generate the parity inputs from the fixtures the Bash suite already holds for old versions. - If the tier-4 migration leg cannot run on the release-line PR (see Migration leg of tier4-kvm provision cannot run on develop-v* release-line PRs #4083), record that in the PR and link the nearest leg that can.
Parent requirement: #4221
Worker brief: Objective: config version migrations run in Go behind their own selector position, proven identical to Bash for every supported older version. Harvest the migration code from go/internal/config on go-port/3811. Add a parity file that feeds each supported older config version to both implementations and compares output and exit status byte for byte; derive the version list from the Bash migration table so the test fails if one is missing. Cover the newer-than-code refusal, and file mode, ownership and backups. Keep Bash default and intact. Proof: tiers 1 to 3 in both positions plus one tier-4 job on the PR head doing a real migration with Go selected; name the leg and paste the unedited evidence block. PR targets develop-v2.1.0 and stacks on the parse/validate child of #4221; if that has not merged, report blocked. Size M.
Activity