feat(pipeline): add optional step support for non-blocking failures#124
Draft
nextlevelshit wants to merge 1 commit intomainfrom
Draft
feat(pipeline): add optional step support for non-blocking failures#124nextlevelshit wants to merge 1 commit intomainfrom
nextlevelshit wants to merge 1 commit intomainfrom
Conversation
Add `optional: true` field on pipeline step definitions that allows steps to fail without halting the entire pipeline. When an optional step fails, dependent steps are gracefully skipped while independent steps continue executing. Key changes: - Add Optional bool field to Step type with YAML support - Introduce StateFailedOptional state across pipeline, event, display, and state store layers - Handle optional failure in both Execute and ResumeFromStep paths - Skip dependent steps when their optional dependency fails - Display optional failures with warning styling (⚠ icon, yellow) - Include optional failure counts in pipeline completion messages - Comprehensive test coverage for all optional step scenarios Closes #118
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
optional: truefield on pipeline step definitions allowing steps to fail without halting the pipelineStateFailedOptionalstate across pipeline executor, event emitter, display layer, and state storeExecuteandResumeFromStepcode pathsSpec
See
specs/118-optional-pipeline-steps/spec.mdfor the full feature specification including user stories, functional requirements, success criteria, and edge cases.Test plan
TestOptionalStepFailureContinuesPipeline— optional step fails, pipeline continuesTestOptionalStepDependencySkipping— dependent steps skipped when optional dep failsTestNonOptionalStepFailureHaltsPipeline— backward compatibility: non-optional still haltsTestOptionalStepDefaultsFalse—Optionaldefaults tofalseTestPipelineCompletionWithOptionalFailures— completion message includes optional failure countTestStateFailedOptionalConstant— state constant verificationTestShouldSkipDueToOptionalDep— table-driven tests for dependency skip logicoptional: true/false/absentparses correctlygo test -race ./...Known limitations
failedOptionalStepsmap from prior run state (steps re-execute on resume)optionalis only used on leaf or non-critical steps (left to user)Closes #118