mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[PR #840] [MERGED] fix: continue jobs + steps after failure #1639
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1639
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/840
Author: @KnisterPeter
Created: 10/14/2021
Status: ✅ Merged
Merged: 12/8/2021
Merged by: @mergify[bot]
Base:
master← Head:if-conditions📝 Commits (10+)
3a2b7affix: continue jobs + steps after failurecc63c2dstyle: correct linter warnings0f0ffbbfix: job if value defaults to success()0bedbd5fix: check job needs recursively0343a4atest: add runner test for job status check functions9b01130test: add unit tests for run context if evaluation8a1d1c3refactor: move if expression evaluation0240159test: add unit tests for step context if evaluation0715896fix: handle job error more resilient6fd63dbfeat: steps should use a default if expression of success()📊 Changes
13 files changed (+523 additions, -69 deletions)
View changed files
📝
pkg/common/executor.go(+4 -5)➕
pkg/common/job_error.go(+30 -0)📝
pkg/model/planner.go(+3 -0)📝
pkg/model/workflow.go(+4 -0)📝
pkg/runner/expression.go(+140 -5)📝
pkg/runner/run_context.go(+27 -55)📝
pkg/runner/run_context_test.go(+139 -2)📝
pkg/runner/runner.go(+15 -2)📝
pkg/runner/runner_test.go(+2 -0)📝
pkg/runner/step_context.go(+15 -0)📝
pkg/runner/step_context_test.go(+87 -0)➕
pkg/runner/testdata/if-expressions/push.yml(+29 -0)➕
pkg/runner/testdata/job-status-check/push.yml(+28 -0)📄 Description
To allow proper if expression handling on jobs and steps (like always,
success, failure, ...) we need to continue running all executors in
the prepared chain.
To keep the error handling intact we add an occurred error to the
go context and handle it later in the pipeline/chain.
Also we add the job result to the needs context to give expressions
access to it.
The needs object, failure and success functions are split between
run context (on jobs) and step context.
Closes #442
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.