Repository navigation
workspace: declare the promotion order of environments, used by promote and status (#4030) - #4055
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.
Closes #4030
A member's promotion order is now declared once, in the order of the
environmentsarray in itschant.config.ts, and promote,chant build --promote-toandworkspace statusread it.environmentsentry may carrycanary?: boolean(object form); bare strings work as before. Pattern entries such aspr-*are not steps. A component's ownenvironments(component.schema.json) say where it is hosted and never set the order.canaryis declared and shown only; nothing acts on it yet, and the docs say so.chant components promote --to <env>defaults--fromto the previous step. A--fromthat skips a step is refused withpromote-skips-environmentand a fix line, unless--allow-skip. Two more refusals cover a defaulted--from:promote-no-previous-environment(--tois the first step) andpromote-to-not-in-order. With no declaredenvironments, promote behaves as before.chant build --components --generate --promote-to <b>applies the same rule at generation time, with--fromtaken from--env, so a generated promote job can't fail at deploy time on a skip.--allow-skipon the build passes through into the generated job's command (GitHub and GitLab; Forgejo's generator writes no promote job).workspace status --jsongainsmembers[].promotionOrder: [{ name, canary }], optional within contract 1, floor 0.124.28, listed in the read contract's "Fields added within version 1" table. The field is namedpromotionOrderbecausemembers[].environmentsalready lists the ledger environments.environmentsliteral is plain (strings, or{ name, endpoint, canary }with literal values, no spread), soworkspace statusstill loads no tsx (workspace status still registers tsx on a steward-index miss, and plugin-loading commands always do #3976). Anything else falls back to loading the config; the field isnullwhen the config can't be read.Level-0 output changes
Recorded on the level-0 exceptions page and #2525:
components promoteandbuild --promote-torefuse a skipped step when the config declaresenvironments(--allow-skiprestores the old behaviour); a missing--fromnow has its own message after the config loads;workspace status --jsongainspromotionOrder. No level-0 golden moved.Acceptance
config.ts,configuration/config-file.mdx,cli/components.mdx).promote-order.test.ts, the promote handler tests, and three build-generation tests).workspace status --json(status-contract.test.ts).Checks
npx tsx scripts/typecheck.ts: no regressions (26 baselined)npx tsx scripts/check-lexicons.ts: no untracked tier-1 failurescli,components,workspace, level-0 goldens, wave-loop goldens and the github, gitlab and forgejo lexicons: 5919 passed, withGITHUB_SHA,GITHUB_RUN_IDandCIset as in CI; rerun after rebasing on workspace: check that trunk commits name their work item, and show it in ci list (#4029) #4054op/factory.e2e.test.tsfailures, pluslineage-adopt,work-historyandwork-lease, which time out under full-suite load and pass alonelint-docs-sentences(no regressions),lint-prompts,check-docs-diataxis,./scripts/build-docs.sh: pass