Repository navigation
Description
What's the problem
Config parsing, validation and defaults are Bash (part of slices 22 to 30, about 2,000 to 2,400 raw lines in all) and are implemented a second time in the dashboard's Python layer. Go render and doctor pieces cannot land on a Go config layer until this part exists behind a selector.
What it impacts
Every verb that reads config. Later port pieces (Caddy render #4222, env and quadlet render #4525 and #4526, doctor #4224) depend on it. Risk: a divergence in validation breaks setup.
How I found it
Parent #4221 under tracker #3811: slice sizes counted on develop; branch go-port/3811 has go/internal/config with tagged parity groups, called from Bash helpers with a Bash fallback. No timing exists; this is a correctness piece. Unknown: whether the Go CLI build (#4528) has merged. If not, this waits on it.
How important is it
Medium: no user-visible gain by itself, moderate risk, and a prerequisite for the render and doctor pieces in v2.1.1.
Acceptance criteria
- Document parse, validation and defaults run in Go when the selector chooses Go. The selector follows the pattern of the landed pieces; Bash stays reachable and stays the default until every criterion holds.
- The existing config and validation suites pass unchanged in both selector positions, and CI runs both.
- The Go unit tests for the harvested non-render files of
go/internal/configare kept and run in CI. - A parity table of valid and invalid documents gives byte-identical output and exit status from Go and Bash.
- Median wall time of the verbs that call the layer is not above Bash, measured the way the landed pieces measure it; the numbers are in the PR.
- No Bash function is removed. The PR states whether
26-appliance-tls-provisioningis in or out of scope. -
make test,make test-patch-coverageandmake lint-file-budgetpass. - Tier: tiers 1 to 3 in both selector positions, and one
tier4-e2elifecycle job on the PR head with the selector on Go, because the layer feeds every verb that runs on a box.
Possible solutions
- Harvest the parse, validate and defaults files from
go/internal/configand expose a subcommand set that the Bash slices call. - Version migrations and credential transforms are sibling children of Piece 4: config document layer in Go (parse, validate, defaults, migrations, credential transforms) #4221; leave them in Bash here.
Parent requirement: #4221
Worker brief: Objective: config document parse, validation and defaults run in Go behind a selector, with Bash still the default and still reachable. Harvest the non-render parse/validate/defaults files of go/internal/config from go-port/3811, expose them as subcommands the Bash slices call, and follow the selector pattern of the pieces already landed on develop-v2.1.0. Run the existing config and validation suites in both selector positions in CI; add a Go-vs-Bash parity table over valid and invalid documents (byte-identical output and exit status); report median wall time against Bash. Remove no Bash. Leave migrations and credential transforms alone (siblings). Proof: tiers 1 to 3 both ways plus one tier4-e2e lifecycle job on the PR head with Go selected. PR targets develop-v2.1.0. If the Go CLI build (#4528) has not merged, stop and report blocked. Size M.
Activity