Repository navigation
v1alpha4: conditional steps (when) and workflow steps - #31
Merged
Merged
Conversation
v1alpha4 is v1alpha3 plus two additions: an optional `when` condition on every step (AEP-0001) and the step type `workflow`, which starts another workflow of the same scope as a child execution. The schema is a copy of v1alpha3 so that older versions stay unchanged; `type: workflow` requires `workflow` and forbids the payloads of the other step types, which in turn forbid `workflow`. The CRDs now serve v1alpha3 and v1alpha4, each generated from its own schema. v1alpha3 stays the storage version while it is the current draft; the versions differ only by additions. Signed-off-by: Erik <erik@weisser.dev>
The reference checker has to know v1alpha4 before the specification text and the tools can follow. The suite is the v1alpha3 suite with apiVersion v1alpha4 (the two digest cases are recomputed because the digest covers apiVersion) plus cases for conditions and workflow steps. The spec examples are copied as v1alpha4 examples because the runner validates the examples of every version. Conditions are parsed by a new module, conformance/conditions.mjs, with the grammar and limits of AEP-0001; semantic.mjs checks references to steps (dependency, declared output) and inputs (warning), restricts workflow step outputs to executionId and status, and treats workflow.inputs values as expression-enabled. migrate converts v1alpha1, v1alpha2 and v1alpha3 to v1alpha4; from v1alpha3 only apiVersion changes. Signed-off-by: Erik <erik@weisser.dev>
Section 3.10 of the v1alpha3 text, which v1alpha4 starts from, is "Object stores and Kubernetes" and 3.11 is "Status", so the new conditions section is 3.12. The v1alpha4 case ids, the diagnostics of conditions.mjs, the schema description, the CRD and the rule catalogue now cite 3.12. Signed-off-by: Erik <erik@weisser.dev>
The analyse-then-act pattern (a risk analysis decides whether a fix workflow runs) needs step conditions and a way to start another workflow from a step. Lead decision D23 accepts AEP-0001 and the new AEP-0028 into a new draft, v1alpha4, with the same exception to the external review as D19 and D22 and an alpha waiver of the discussion period. v1alpha3 stays the current draft. AEP-0001 is adapted to v1alpha4: section 3.12, no event root, outputs read as JSON. AEP-0006 points to AEP-0028 in its alternatives. GOVERNANCE.md and the AEP process name D23 as a recorded exception. Signed-off-by: Erik <erik@weisser.dev>
v1alpha4 is the v1alpha3 text plus conditions (section 3.12, matching conformance/conditions.mjs and the schema), the changed execution model (5.6.3), workflow steps (5.6.6), workflow.start, step.skipped and the parent fields of workflow.started, and section 14.3 with the changes from v1alpha3. The Kubernetes binding describes CRDs that serve v1alpha3 (storage) and v1alpha4. The example cve-risk-then-fix shows a condition and a workflow step; spec/README.md lists the new version as the next draft. Signed-off-by: Erik <erik@weisser.dev>
The website renders the v1alpha4 text and glossary with a next-draft banner, lists v1alpha4 in the sidebar, the version selector, the specification overview and the versioning page, and serves its schema. v1alpha3 stays the current draft and the default everywhere else. The changelog records v1alpha4. Signed-off-by: Erik <erik@weisser.dev>
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
Adds
v1alpha4as the next draft:v1alpha3plus exactly two additions.when, spec section 3.12, AEP-0001 accepted): a restricted, typedcondition grammar with limits and static rules; step outputs are read as JSON in conditions.
Changed execution model (5.6.3): skipped with reason
conditioncounts as success,conditionError,dependencyFailed,missingOutput; new eventstep.skipped.type: workflow, section 5.6.6, new AEP-0028 accepted): start anotherworkflow of the same scope as a child execution (action
workflow.start), with its ownpermissions, policies, approvals and budget; shared parent budget, cycle (
workflowCycle) anddepth 5 (
workflowDepthExceeded) limits, outputsexecutionIdandstatus,childFailed.Both AEPs are accepted by lead decision D23 (same exception to D16 as D19/D22, alpha waiver).
What changed
schema/awp.v1alpha4.json, CRDs servingv1alpha3(storage) andv1alpha4conformance/v1alpha4/,conformance/conditions.mjs,migratetov1alpha4spec/v1alpha4/(text, glossary, examples incl.cve-risk-then-fix.yaml),spec/README.mddocs/decisions.mdD23,GOVERNANCE.md,docs/aep-process.mdv1alpha3stays the current draft. README, Quickstart and tool defaults are unchanged.Test results
npm test: 956/956 passedsite:check:examples(9/0 failed), build,check:linksOKgit diff origin/mainfor older schemas, specs and suites: emptyFollow-ups
v1alpha4(sync needsconformance/conditions.mjs)whenand workflow steps, add the v1alpha4 example set