Repository navigation
feat(workspace): fold the release just recipes into the release feature group - #1664
Merged
Merged
Conversation
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.
Summary
DEVKIT_FEATURES_DISABLED=releasenow takes the releasejustrecipes with it.Since #1651 the root
CHANGELOG.mdfollows thereleasefeature group, sojust reset-changelogin a release-disabled consumer failed on a missingfile rather than a missing workflow. The rest of the set was already dead in
kind:
prepare-release,prepare-hotfix,finalize-release,promote-release,publish-candidate,abandon-releaseandchangelog-previewall dispatch workflows the same group copy-excludes, so theycould only fail at dispatch time.
Decision: option (a) — the recipes follow the feature group
The issue offered (a) prune the recipes with the group, or (b) make each recipe
fail fast with a "release feature disabled" message. I took (a), in its
rendered/pruned
justfile.ghsection form rather than as a new managed file.Why, judged against how the machinery in
assets/init-workspace.shactuallyworks:
DISABLED_FEATURESis the SSoT, and it lives at scaffold time. Everyexisting consumer of the knob (
feature_pathscopy-excludes/prunes,render_actionlint_optout, the sync-issues contradiction notice) resolves itonce in
init-workspace.shand bakes the result into the tree. Option (b)would teach eight recipe bodies in a managed file to re-parse
.vig-osatruntime — the same knowledge copied into the scaffold output, in a second
language, in a file the consumer must never edit. That is the DRY/SSoT
violation the render functions exist to avoid.
render_workflow_modeldrops theprepare-hotfixrecipe from.devcontainer/justfile.ghunderDEVKIT_WORKFLOW=trunk([FEATURE] Port the hotfix release lane to the workspace scaffold (copy-exclude under trunk) #1625, Trunk render leaves sync-main-to-dev prose mentions in promote-release.yml #1233:"no recipe dispatching a workflow the repo does not have"). [FEATURE] Release-disabled consumers keep release-only just recipes that assume a CHANGELOG #1656 is the same
rule with
releaseas the axis instead of the workflow model.render_actionlint_optout([FEATURE] Ship actionlint to consumers: the workflow-lint hook plus a managed actionlint.yaml config #1660) is the shape to copy: afeature_disabled-guarded, sentinel-bracketed, idempotent block excision forthe half of a feature group that a path prune cannot reach. Implemented here
as
render_release_optoutwith the same# >>> devkit:release/# <<< devkit:releasemarkers.feature_pathsentry was not available.justfile.ghalsocarries
gh-issues/gh-log/gh-branch, which are not releasemachinery — so the group takes the section, not the file.
justfile.releasewas rejected as over-build. It isthe conceptually cleanest variant (a pure
feature_pathsentry, likeworktree's.devcontainer/justfile.worktree) but it changes managed-fileshape: a new template file, a new
import?in the scaffold rootjustfile, anew
scripts/manifest.tomlentry, a retired-path entry so the recipes do notride along twice through an upgrade, and churn in every consumer's
.devcontainer/. The issue iseffort:small; the sed excision buys the sameuser-visible behaviour for ~35 lines.
justfile.ghis MANAGED, unlike the preserved.pre-commit-config.yamlthe actionlint excision cuts: the template copy is rewritten on every upgrade,
so the excision is re-applied each run, costs nothing when the feature is on,
and clearing the key restores the recipes on the next
--force.Net effect:
just --listin a release-disabled repo offers only commands therepo can actually run.
Two implementation details worth review:
justfile.gh(the SSoT); thescaffold copy is regenerated by
scripts/sync_manifest.py. The<<<markersits after
reset-changelog, so the manifest's existingRemoveBlockof thedevkit-only
pullrecipe leaves it as the derived file's last line.blank line (
sed '${/^$/d}'). Without it the managed file would end on adouble newline,
end-of-file-fixerwould rewrite it in the consumer's repo,and the next upgrade would put it back — a perpetual one-line diff.
Declined: the
gh-templateschangelog proseThe issue's secondary question — the changelog references in
.github/pull_request_template.mdand the sixISSUE_TEMPLATE/*.ymlforms —is deliberately not addressed here. Reasons:
justsurface did not.Every issue form's
changelog-categorydropdown carries an explicitNo changelog neededoption, and the PR template says in so many words"If no changelog update is needed, write 'No changelog needed' and explain
why." Nothing in the scaffold's CI gates either. They are advisory prose a
human answers, not a command that exits non-zero — which is exactly the
distinction the issue itself draws when it grades the question "more weakly".
- type: dropdownblock (with itsid,attributes,options) from sixGitHub issue-form schemas plus two sites in the PR template — a
cross-group render (
releasemutatinggh-templatesfiles) whose failuremode is shipping an invalid issue form to consumers. Doing only the PR
template would reproduce the very inconsistency the issue complains about,
so it is all-or-nothing and well past
effort:small.what a feature group owns. Happy to file a follow-up if you want it.
Testing
tests/bats/init-workspace.bats: four new tests (TDD — thetest:commitis red on three of them, the fourth is the enabled-path guard).
gh-issues/gh-log/gh-branch, the file still parses underreal
just, and it does not end on a blank line;inert when the feature is on);
--forceupgrades.just lintclean,just precommit(prek, all files)green end to end,
tests/bats/green,pytest testsgreen excludingtest_image(lagging local:devimage, unrelated to this branch — CIcovers it).
Refs: #1656