-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add guide for keeping derived private repositories current #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e1af344
docs: add guide for keeping derived private repositories current
Rafa-Ross b1f1dce
docs: address Codex review on updating guide
Rafa-Ross 2f7d76f
docs: use fetched template tag refs
Nickfost b1f0bc0
docs: make template updates collision-safe
Nickfost 832b531
docs: make template updates fail closed
Nickfost 188f62d
docs: address seventh Codex review on updating guide
Rafa-Ross 0cacdf6
docs+test: address eighth Codex review on updating guide
Rafa-Ross 2f5d4e1
docs: address ninth Codex review on updating guide
Rafa-Ross 2bc20e9
docs: address tenth Codex review on updating guide
Rafa-Ross 2a820f4
test: match policy assertion to temporary-ref tag verification
Rafa-Ross d093b1b
docs: abort before promoting a rewritten template tag
Rafa-Ross dceec93
docs+test: address twelfth Codex review on updating guide
Rafa-Ross 726bc0b
docs: persist trusted tag OIDs in versioned TEMPLATE_RELEASE data
Rafa-Ross 5653d9b
docs: address thirteenth Codex review on updating guide
Rafa-Ross c89bd7a
docs: peel annotated release tags to the tagged commit
Rafa-Ross 5178748
docs: compare raw tag-object OID, peel separately for the merge source
Rafa-Ross File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Keeping a private configuration repository up to date | ||
|
|
||
| A private configuration repository is created from this public template | ||
| and then lives its own life. This guide explains how it stays current. | ||
|
|
||
| ## Two different version numbers | ||
|
|
||
| - **`schema_version`** (inside `fleet.json`) is the version of the | ||
| *data contract* — the fields the engine and validator understand. It | ||
| changes rarely and only through an explicit migration (see below). | ||
| - **Template version** is the version of the *starting content* — the | ||
| scripts, validators, examples, and documentation you copied from this | ||
| template. It is tracked by the template's tagged releases, not by | ||
| anything inside `fleet.json`. | ||
|
|
||
| Bumping one never bumps the other. A new template release can ship | ||
| validator fixes with an unchanged `schema_version`; a schema migration | ||
| can happen without any other template change. | ||
|
|
||
| ## Template releases are versioned | ||
|
|
||
| This template publishes tagged releases. Record the release you started | ||
| from in your private repository (for example in its README), and review | ||
| release notes when updating. Treat template files as vendored code: | ||
| update them deliberately, not casually. | ||
|
|
||
| ## GitHub template repositories have no fork ancestry | ||
|
|
||
| A repository created with GitHub's "Use this template" button is **not** | ||
| a fork: it has no git ancestry link to the template, so | ||
| `git pull upstream` does not work and GitHub will never offer sync PRs. | ||
| Updating is an explicit operation: | ||
|
|
||
| 1. Add the template as a remote and fetch a tag: | ||
|
|
||
| ```bash | ||
| git remote add template https://github.com/RandomDevelopment/ci-fleet-config-template.git | ||
|
Nickfost marked this conversation as resolved.
Outdated
|
||
| git fetch template --tags | ||
|
Nickfost marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| 2. Cherry-pick or merge the tagged release you want, resolving conflicts | ||
|
Nickfost marked this conversation as resolved.
Outdated
|
||
| against your local `fleet.json` (which is yours and must never be | ||
| overwritten by template examples). | ||
| 3. Run `./scripts/validate.sh --strict` before committing. | ||
|
|
||
| ## Validation is pinned to immutable releases | ||
|
|
||
| Controller `engine_ref` values and any reusable workflow references must | ||
| be full reviewed commit SHAs, not moving tags or branches. When you | ||
| update the pinned engine, resolve the exact merge commit on the engine's | ||
| default branch, review it, and pin that 40-hex SHA. The strict validator | ||
| runs against the pinned contract, so validation results are reproducible. | ||
|
Nickfost marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Dependabot update PRs | ||
|
|
||
| Keep a `.github/dependabot.yml` in the private repository covering | ||
| GitHub Actions. When your workflows pin actions or reusable workflows to | ||
| commit SHAs, Dependabot still opens update PRs for them (it understands | ||
| SHA-pinned actions with version comments). Review each PR like any | ||
| engine update: confirm the new SHA is a reviewed upstream release, then | ||
| let the strict validator and CI run before merge. | ||
|
|
||
| ## Schema migrations are explicit tooling | ||
|
|
||
| When the engine introduces a new `schema_version`, the migration is a | ||
| reviewed, mechanical transformation — not a hand edit: | ||
|
|
||
| 1. Read the migration notes for the new schema version. | ||
| 2. Run the migration tooling shipped with that engine/template release | ||
| against a branch of the private repository. | ||
| 3. Run `./scripts/validate.sh --strict` and review the diff. | ||
|
Nickfost marked this conversation as resolved.
|
||
| 4. Merge only when every controller in the fleet runs an engine that | ||
| understands the new schema. | ||
|
Nickfost marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Optional adopter registration, never telemetry | ||
|
|
||
| This project collects **no telemetry** and there is no phone-home of any | ||
| kind. If the community wants visibility into who operates a fleet, it is | ||
| strictly optional and opt-in: an `ADOPTERS.md` pull request or a | ||
| registration issue form on the public engine repository. Never a | ||
| requirement, never automatic. | ||
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.
Uh oh!
There was an error while loading. Please reload this page.