|
| 1 | +--- |
| 2 | +name: stabilize-spec |
| 3 | +description: Automate the Ignition config spec stabilization process |
| 4 | +--- |
| 5 | + |
| 6 | +# Ignition Spec Stabilization |
| 7 | + |
| 8 | +This skill automates the complete Ignition config spec stabilization process following the exact 8-commit structure from [PR #2202](https://github.com/coreos/ignition/pull/2202). |
| 9 | + |
| 10 | +## What it does |
| 11 | + |
| 12 | +Performs a complete spec stabilization by creating 8 atomic commits that: |
| 13 | + |
| 14 | +1. Rename the experimental package to stable (e.g., `v3_6_experimental` → `v3_6`) |
| 15 | +2. Stabilize the spec (remove PreRelease, update tests, update Accept header) |
| 16 | +3. Copy the stable spec to a new experimental version (e.g., `v3_6` → `v3_7_experimental`) |
| 17 | +4. Adapt the new experimental spec |
| 18 | +5. Update all imports across the codebase (72+ files) |
| 19 | +6. Update blackbox tests |
| 20 | +7. Update documentation generation |
| 21 | +8. Update docs and regenerate schemas |
| 22 | + |
| 23 | +## Prerequisites |
| 24 | + |
| 25 | +Before running this skill, ensure: |
| 26 | + |
| 27 | +```bash |
| 28 | +# Install schematyper (required for regenerating schemas) |
| 29 | +cd /tmp |
| 30 | +git clone https://github.com/idubinskiy/schematyper.git |
| 31 | +cd schematyper |
| 32 | +go mod init github.com/idubinskiy/schematyper |
| 33 | +echo 'replace gopkg.in/alecthomas/kingpin.v2 => github.com/alecthomas/kingpin/v2 v2.4.0' >> go.mod |
| 34 | +go mod tidy |
| 35 | +go install . |
| 36 | + |
| 37 | +# Install build dependencies (Fedora/RHEL) |
| 38 | +sudo dnf install -y libblkid-devel |
| 39 | +``` |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +When invoked, provide the version information: |
| 44 | + |
| 45 | +``` |
| 46 | +Current experimental version: 3.6.0-experimental |
| 47 | +Target stable version: 3.6.0 |
| 48 | +Next experimental version: 3.7.0-experimental |
| 49 | +``` |
| 50 | + |
| 51 | +The skill will then: |
| 52 | + |
| 53 | +1. ✅ Perform all code changes across the repository |
| 54 | +2. ✅ Create 8 properly structured commits |
| 55 | +3. ✅ Run `./generate` to regenerate schemas and docs |
| 56 | +4. ✅ Run `./build` to verify compilation |
| 57 | +5. ✅ Run `./test` to verify all tests pass |
| 58 | +6. ✅ Provide a summary of what was done |
| 59 | + |
| 60 | +## Checklist Coverage |
| 61 | + |
| 62 | +This skill completes all items from the [stabilization checklist](https://github.com/coreos/ignition/blob/main/.github/ISSUE_TEMPLATE/stabilize-checklist.md): |
| 63 | + |
| 64 | +### Making the experimental package stable ✅ |
| 65 | +- Rename `config/vX_Y_experimental` to `config/vX_Y` |
| 66 | +- Drop `_experimental` from all imports |
| 67 | +- Update `MaxVersion` to delete the `PreRelease` field |
| 68 | +- Update `config.go` comment block |
| 69 | +- Update `config_test.go` to test stable version valid, experimental invalid |
| 70 | +- Update Accept header in `internal/resource/url.go` |
| 71 | + |
| 72 | +### Creating the new experimental package ✅ |
| 73 | +- Copy `config/vX_Y` into `config/vX_(Y+1)_experimental` |
| 74 | +- Update all imports to `config/vX_(Y+1)_experimental` |
| 75 | +- Update `MaxVersion` with `PreRelease = "experimental"` |
| 76 | +- Update `config.go` prev import to stable package |
| 77 | +- Update `config_test.go` for new experimental version |
| 78 | +- Simplify `translate.go` to only `translateIgnition` and `Translate` |
| 79 | +- Update `translate_test.go` old import to stable version |
| 80 | +- Update `config/config.go` imports to experimental version |
| 81 | +- Update `config/config_test.go` to add new experimental version |
| 82 | +- Update `generate` script |
| 83 | + |
| 84 | +### Update all relevant places ✅ |
| 85 | +- Update all imports from `vX_Y_experimental` to `vX_(Y+1)_experimental` |
| 86 | +- Add import `config/vX_Y/types` to `tests/register/register.go` |
| 87 | +- Update import to `vX_(Y+1)_experimental` in `tests/register/register.go` |
| 88 | +- Add `vX_Y/types` to `configVersions` in `Register()` |
| 89 | + |
| 90 | +### Update the blackbox tests ✅ |
| 91 | +- Bump invalid `-experimental` version in `VersionOnlyConfig` test |
| 92 | +- Change all `X.Y.0-experimental` to `X.Y.0` in tests |
| 93 | +- Update Accept header checks in `tests/servers/servers.go` |
| 94 | + |
| 95 | +### Update docs ✅ |
| 96 | +- Update `internal/doc/main.go` |
| 97 | +- Run `generate` to regenerate schemas and docs |
| 98 | +- Add section to `docs/migrating-configs.md` |
| 99 | +- Update `docs/specs.md` |
| 100 | +- Note stabilization in `docs/release-notes.md` |
| 101 | + |
| 102 | +## What's NOT covered |
| 103 | + |
| 104 | +The following sections from the checklist require external repos and are NOT automated: |
| 105 | + |
| 106 | +- External tests (`.cci.jenkinsfile`, fedora-coreos-config) |
| 107 | +- Other packages (ignition-config-rs, coreos-installer, ign-converter, Butane, FCOS docs, coreos-assembler, MCO) |
| 108 | + |
| 109 | +These must be done manually after the PR is merged. |
| 110 | + |
| 111 | +## Example Output |
| 112 | + |
| 113 | +After running the skill, you'll see: |
| 114 | + |
| 115 | +``` |
| 116 | +✨ Stabilization complete! |
| 117 | +
|
| 118 | +Created 8 commits: |
| 119 | + ceb03d33 docs: update for spec stabilization |
| 120 | + e5cac5c1 docs: shuffle for spec stabilization |
| 121 | + 2aca7225 tests: update for new experimental spec |
| 122 | + 3252aa50 *: update to v3_7_experimental spec |
| 123 | + 0e5a3297 config/v3_7_experimental: adapt for new experimental spec |
| 124 | + 21d51407 config: copy v3_6 to v3_7_experimental |
| 125 | + 57d4d86e config/v3_6: stabilize |
| 126 | + 8a071635 config: rename v3_6_experimental to v3_6 |
| 127 | +
|
| 128 | +Next steps: |
| 129 | +1. Review commits: git log --oneline -8 |
| 130 | +2. Create PR to main branch |
| 131 | +3. Update issue checkboxes (see checklist above) |
| 132 | +4. After merge, handle external tests and packages |
| 133 | +``` |
| 134 | + |
| 135 | +## Reference |
| 136 | + |
| 137 | +- [Issue #2200 - Stabilization Checklist](https://github.com/coreos/ignition/issues/2200) |
| 138 | +- [PR #2202 - Example Stabilization (3.6.0)](https://github.com/coreos/ignition/pull/2202) |
| 139 | +- [Stabilization Template](https://github.com/coreos/ignition/blob/main/.github/ISSUE_TEMPLATE/stabilize-checklist.md) |
0 commit comments