actions / actions/runner

Inconsistency in when "Required for merge" checks are considered satisfied.

Open
#1,115 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug

If a repository is set up with merge checks to require that a certain job succeeded, then the definition of succeeded is inconsistent across the product.

  1. If you use the if: <bool> key in a job, then the job is considered to succeed if the boolean value is false even though the job did actually not run. That is a reasonable definition, basically "succeeded means it did not fail". This is a very useful definition to be able to scale the workflow while keeping runtime down. I propose to not change this.

  2. On the other hand, if you use the path key feature for the entire workflow then the job is considered to not have succeeded if the job did not run (because the workflow did not run).

So here there are two instances of "job did not run" that lead to a different decision by the merge checks logic. I propose to change the workflow/path logic to count skipped jobs as succeeded the same way as you already do with if.

Our use case is that we try to use Github Actions for a mono repo with lots of workflows while keeping the triggered jobs down to what is actually needed to be done based on the changeset. For us, the ideal behavior would be that required jobs from workflows that did not run because of no changes were also considered as satisfied.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the merge-check handling for workflow-level path skips and job-level if skips described in the issue. Compare how each case is marked when a job does not run; done means skipped jobs from workflows excluded by paths satisfy required checks consistently with skipped jobs controlled by if.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.