Repository navigation
releases: implicit releases for projects with no components, and release export (#4046) - #4061
Merged
Merged
Conversation
A project with no *.component.ts file is now cut from its build output. Each environment's child compile builds the project as `chant build <src> --env <env> -o <output>` would and records every file that build writes as a template with component null; params come from the build's buildParams and artifactDigests is empty. buildCommand takes a writeFile hook, so the cut records the files from memory and writes nothing into the checkout. `chant release export <label|digest> --env <env> [-o <dir>]` writes a target's recorded files after checking each digest. A no-component project's own deploy reads those files. `components promote --release` refuses an implicit release and names the export command. An e2e test cuts one commit of the getting-started example in two clones and compares each environment's output byte for byte.
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 #4046
A project with no components gets a release from each green commit: its build output per environment, as ws-104 question 5 describes.
release compilebuilds the project aschant build <src> --env <env> -o <output>would. Every file the build writes becomes a template withcomponent: null;paramscome from the build'sbuildParams;artifactDigestsis empty.buildCommandgains an optionalwriteFilehook, so the cut keeps the files in memory and writes nothing into the checkout. Plainchant buildis unchanged.release cuttakes--src <dir>(defaultsourceDir, then.),-o <file>(defaultdist/build.yaml, since the k8s and helm serializers write YAML) and--lexicon. A project that declaresstacksand no--srcis refused.release-no-componentsnow means components are declared but none is enabled anywhere and nothing compiled.components promoteworks through components and their deploy records, so it refuses such a release and nameschant release export <label|digest> --env <env> [-o <dir>] [--json]. Export writes the target's recorded files at their recorded paths after checking each digest, refusing missing or changed bytes and paths outside the project, and the project's own deploy (an Op or a CI job) reads them.Level-0 output changes
On the exceptions page and #2525:
release cuton a project with no components now cuts and writes_releases/where it refused;release-no-componentsnarrowed; promote refuses these releases and points torelease export. No golden moved.Acceptance
lifecycle/release-cut.test.ts"is cut with no artifacts and a target per environment holding the build output, and lists like any release"; implicit cases incomponents/release-promote.test.ts).cli/handlers/release-implicit.e2e.test.ts: a copy ofexamples/getting-startedwith dev and prod and a per-environment build parameter, cut in two clones; equalreleaseDigest; each environment's exported files compared withBuffer.equals; dev and prod differ; nothing written to disk by the cut).Checks
npx tsx scripts/typecheck.ts: no regressions (26 baselined)npx tsx scripts/check-lexicons.ts: no untracked tier-1 failuresGITHUB_SHA,GITHUB_RUN_IDandCIset, after rebasing on trust: signed green tags and run statements, a role for who may cut a release, signed release records #4031 (conflicts inrelease.ts,main.tsandcli/release.mdxmerged sorelease cuttakes both--signand--src/-o/--lexicon)op/factory.e2e.test.tsfailures and load timeouts that pass alonelint-docs-sentences(no regressions),lint-prompts,check-docs-diataxis,./scripts/build-docs.sh: passFindings posted on behold#680 and #4034: such a release has no "running in env" signal, since deploy records are per component.