Skip to content

Piece 4: config document layer in Go (parse, validate, defaults, migrations, credential transforms) #4221

Open
0 of 3 issues completed

Description

@pithead-developer

What's the problem

Config parsing, validation, defaults, version migration and credential transforms are about 2,000 to 2,400 raw lines of Bash (slices 22 to 30, depending on whether 26-appliance-tls-provisioning, 358 lines, is counted) and are re-implemented in the dashboard's Python layer.

What it impacts

Every verb that reads config; render and doctor depend on it. Risk: operators on older config versions.

How I found it

Slice sizes counted on develop. go-port/3811 has go/internal/config with tagged parity groups, called from Bash helpers with Bash fallback. No timing; correctness piece.

How important is it

Medium; moderate risk because bad config handling breaks setup.

Acceptance criteria

  • Validation, defaults and migrations run in Go behind their own selector; Bash stays reachable. Document parse/validate may flip separately from migrations if needed.
  • Existing config and validation suites pass unchanged in both modes; Go unit tests kept.
  • A new parity file feeds every supported older config version to both and compares output and exit status byte for byte.
  • Go median wall time not above Bash for verbs calling the layer; default flips in the release where all hold, otherwise it rolls.

Possible solutions

Harvest the non-render files of go/internal/config; expose a subcommand set the Bash slices call, retiring Bash functions only after a release with Go as default. Whether the dashboard's Python layer shares the package is out of scope.

Sub-issues

Sub-issues

0 of 3 Issues completed
Loading 3 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrefactorsize:Ltracker

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions