feat!: regroup the parameter surface into concern structs#28
Merged
Conversation
Five flat keys (concurrent, runners, runner_defaults, runner_tokens, secret_store_path) and six concern structs (configuration_file, runner_account, packages, rootless_docker, runner_service, standalone with self_update nested inside), declared in the order the generated documentation and the example node files preserve. Every default moves to the module data layer behind a deep-merge lookup rule with the '--' knockout prefix, so consumer data holds only deviations; the class signature is types-only and Struct types reject unknown subkeys at compile time. The apply script installs on any declared-standalone host, enabling the self-update loop on a host not declared standalone fails the compile, and healthcheck_interval lives on the standalone struct. BREAKING CHANGE: the flat 1.x parameter names are gone; consumer data must move to the struct keys.
The runner account's identity keys are read by every concern even when its manage is false (socket derivation, file ownership, the service ExecStart), so the advisory's claim that subkeys under an effective manage: false are inert was wrong for shared-input keys. The advisory now says the module does not enforce resources from them and, staying module-neutral, that the module may still read some of them as shared inputs; the unit spec pins the wording and rejects the inert phrasing.
One coherent description of the new surface: separate entries for the regrouping, the module-data defaults with deep merge, and the tokens rename; the Removed bullets read in struct-era key names and the data-check and apt-fix entries reference the new toggle paths.
The directory-tree annotations, the dependency note, and the spec-suite description now name the struct-era toggles (packages.sources.manage, the manage subkeys) instead of the flat manage_* parameters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13.
Changes
The parameter surface regroups into five flat keys (
concurrent,runners,runner_defaults,runner_tokens,secret_store_path) and six parameter groups, one hash per concern (configuration_file,runner_account,packages,rootless_docker,runner_service, andstandalonewithself_updatenested inside), declared in a deliberate order that the generated REFERENCE.md and the example node files preserve: the config.toml content first, then the host concerns.Every default now lives in the module data layer and each group carries a deep-merge lookup rule, so consumer data holds only deviations: a node file setting
rootless_docker.manage: trueinherits the rest of the group, hierarchy layers can own different subkeys of one group, array subkeys union across layers with a---prefixed element removing the matching element a lower layer contributed (theknockout_prefixof the deep merge), and a mistyped subkey fails the compile instead of being silently ignored. The class signature is types-only; a resource-style declaration bypasses Hiera merging and must pass complete hashes, as documented.The apply script now installs on any declared-standalone host (
standalone.manage: true), not only with the self-update loop, and enablingstandalone.self_update.manageon a host not declared standalone fails at compile time.healthcheck_intervallives on thestandalonegroup.The data check's advisory no longer calls subkeys under a disabled
managetoggle inert: it reports them as not enforced, since the module may still read some of them as shared inputs (the runner account's identity keys are read by every concern regardless of the toggle).The README,
examples/data/, CONTRIBUTING, and REFERENCE.md are reworked to the new surface, and the unreleased CHANGELOG entries are consolidated into one coherent description of it.Verification
---prefixed element removing the matching lower-layer element, and a plain-YAML token store is wrappedSensitiveby theconvert_tolookup rule.fail()inmanifests/init.pp, the default values indata/common.yaml, theknockout_prefix: '--'entry in thelookup_options, theStructtype rejecting unknown subkeys, and the advisory wording inscripts/check_hiera_data.rb.managetoggle gets the non-failing advisory.