Repository navigation
chore: genericize environment-specific examples and fixtures - #105
Merged
Merged
Conversation
Examples, golden fixtures and architecture notes carried identifiers from the environment they were originally recorded against: host names, an internal address range, repository paths, and cluster and tenant names. None of that is needed to understand or exercise the behaviour, and none of it belongs in a public repository. Everything now uses a single consistent fictional namespace: example.com and example.net for hosts, the RFC 5737 documentation range for addresses, and an example-group hierarchy for repository paths. Fixture directories are renamed to describe what they exercise rather than where they came from, so mature-tenant-prd is the full-inventory tenant and fresh-tenant-dev is the fresh-bootstrap tenant. The golden trees were regenerated with cmd/gitops-fixture-dump rather than edited by hand, and the result was diffed against the previous trees with the identifier substitutions applied: same file set, same content, no change beyond the identifiers themselves. Recorded credential material in the fixtures is replaced with deterministic synthetic values of the same shape and length, so the layout engine still sees the same structure. Regression coverage is unchanged. Provider URL handling, nested group preservation, host mismatch refusal, repository pagination and the layout and coverage goldens all still assert exactly what they asserted before. The only changes to non-test source are two comments.
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.
Why
Examples, golden fixtures and architecture notes carried identifiers from the environment they were originally recorded against. The categories involved were host names, an internal address range, repository paths, and cluster and tenant names. None of it is needed to understand or exercise the behaviour, and none of it belongs in a public repository.
What
A single consistent fictional namespace throughout:
gitlab.example.com,gitlab.internal.example.net*.example.com192.0.2.0/24)example-group/<domain>/<service>/live-infrastructuremgmt-cluster-01,example-tenantFixture directories are renamed to describe what they exercise rather than where they came from:
mature-tenant-prdis the full inventory tenant: helm matched and unmatched mix, native CRs, all three native tiers, base and env split, Flux ownership filter.fresh-tenant-devis the fresh bootstrap shape: the conditionalinfra-configsgate and the minimal tenant overlay.Recorded credential material in the fixtures is replaced with deterministic synthetic values of the same shape and length, so the layout engine sees the same structure.
How the goldens were changed
Regenerated with
cmd/gitops-fixture-dump, the documented path, rather than edited by hand. The result was then diffed against the previous trees with the identifier substitutions applied: same file set, same content, zero deltas beyond the identifiers themselves (24 and 42 files respectively).Behaviour
None. The only changes to non-test source are two comments. Regression coverage is untouched:
Full suite, build and vet pass. Two files remain unformatted by
gofmt; both were already unformatted onmainand are deliberately not touched here to keep this change to one purpose.