Loading
Add a license catalog keyed by tier and add-on
Closes #26 (closed)
up --license-tier ultimate --license-addon self_hosted_dap selects a license from a catalog the operator owns, instead of taking whichever source discovery finds. The catalog is a JSON file outside the repo (SIM_LICENSE_CATALOG, default ~/.config/gitlab/simulation.license-catalog.json). Each entry maps a tier and add-ons to a file path or an env var name, never contents; a catalog that carries anything else is refused. The repo ships gce/fixtures/license-catalog.example.json with placeholder references only.
- A pair the catalog lacks, or a source that is absent, fails
upbefore provisioning and lists the catalogued pairs. - After activation
upreads the plan and add-on names back from the instance. A mismatch failsupwithfailed_steplicense. - State records
license_requestedandlicense_verified(tier and add-on names only), surfaced instatus --json, nowschema_version4. - The seat assignment defaults to the first requested add-on, so
--license-addon self_hosted_dapno longer asks for aduo_enterpriseseat. - Without the flags, discovery behaves as before. The flags refuse to combine with
--license,--skip-activation,--no-gitlabor--base dev.
This catches the disagreement #8 (closed) describes at the up step when the caller asks through the catalog. It does not change just lab license, so #8 (closed) stays open for that recipe.
Proof:
- The engine selftest covers a missing entry, a missing source, a mismatch and a match against stubbed sources, and asserts that no output or state carries the planted license contents.
- One live run on GCE omnibus (19.5.6-ee,
SIM_LICENSE_MODE=staging, no gateway) with a catalog entry pointing at an existing offline license file:license_requestedandlicense_verifiedboth read ultimate with self_hosted_dap. The VM is deleted. - Word budget stays at the ceiling: the License section of
gce/bases.mdlost as many words as it gained. - Local
just skill-scanreports 32 of 36 accepted Tool Parameter Abuse findings ingce/engine-selftest.sh, on origin/main as well; the hosted pipeline is the gate for that count.
Edited by Andrew Dunn