Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 8

GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

This behavior seems wrong to me. What we want to do is run code lint when needed using parallel actions. If no files were changed that are appliable to a particular linter then it returns neutral status. We expect the remaining linters to continue as normal. However, they get cancelled automatically. 

 

Here's our main.workflow file:

 

workflow "Housekeeping" {
  on = "push"
  resolves = ["Branch Cleanup"]
}

action "Branch Cleanup" {
  uses = "jessfraz/branch-cleanup-action@master"
  secrets = ["GITHUB_TOKEN"]
}

workflow "Slash Commands" {
  on = "issue_comment"
  resolves = ["/rebase"]
}

action "/rebase" {
  uses = "docker://cirrusactions/rebase:latest"
  secrets = ["GITHUB_TOKEN"]
}

workflow "Code Lint (Syntax)" {
  on = "push"
  resolves = [
    "Lint PHP 5.6",
    "Lint PHP 7.3.0",
    "Lint JavaScript",
    "Check Lint Results",
  ]
}

action "Get Changed Files" {
  uses = "lots0logs/gh-action-get-changed-files@master"
  secrets = ["GITHUB_TOKEN"]
}

action "Lint PHP 5.2" {
  uses = "docker://elegantthemes/gh-action-lint-php:5.2.17"
  needs = ["Get Changed Files"]
}

action "Lint PHP 5.6" {
  uses = "docker://elegantthemes/gh-action-lint-php:5.6.39"
  needs = ["Get Changed Files"]
}

action "Lint PHP 7.3.0" {
  uses = "docker://elegantthemes/gh-action-lint-php:7.3.0"
  needs = ["Get Changed Files"]
}

action "Lint JavaScript" {
  uses = "docker://elegantthemes/gh-action-lint-js:latest"
  needs = ["Get Changed Files"]
}

action "Check Lint Results" {
  uses = "lots0logs/gh-action-conditional-failure@1.0.0"
  needs = ["Lint PHP 5.2"]
  args = "--file-exists **/lint-failed/*"
  env = {
    success_msg = "Success! No syntax errors found."
    fail_msg = "Syntax errors found!"
  }
}
 

 

You can see the failure here: https://github.com/elegantthemes/submodule-builder/actions/workflow-runs/MDEwOkNoZWNrU3VpdGU2NjU0NDc...

7 Replies
Copilot Lvl 3
Message 2 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

I just discovered the same issue. This seems to have changed recently. Some older workflows did work like expected.

 

Now:

Cancelled.png

 

The same workflow a month ago. I am happy to help debugging.

Skipped.png

Copilot Lvl 2
Message 3 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

I also just discovered this behavior and found out that it's documented in the official docs (emphasis mine):

 

When an action returns [the neutral exit status], GitHub terminates all concurrently running actions and prevents any future actions from starting.

 

The failure exit status shares the same behavior:

 

>  When an action fails, all concurrent actions are cancelled and future actions are skipped.

 

Copilot Lvl 3
Message 4 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

I don´t know if it´s just me but this makes no real sense. The previous behavior was way more flexible for me.

 

@mcolyerDo you have any information about that?

Pilot Lvl 1
Message 5 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

Yeah, I've got the same observation. It's not documented explicitly anywhere, so I'm not sure whether it's expected or not. But +1 for making "filter" actions cancel only its branch, not parallel subflows...

Highlighted
Ground Controller Lvl 1
Message 6 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

Run into the same issue right now and in my opinion it does not make sense to cancel parallel tasks on a neutral exit...

 

Screenshot 2019-04-17 at 09.28.31.png

 

Screenshot 2019-04-17 at 09.31.39.png

Pilot Lvl 1
Message 7 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

Community Manager
Message 8 of 8

Re: GitHub Actions: A Neutral Status In One Action Cancels All Parallel Actions

As pointed out above, it is documented and intentional behavior. I've passed along the feedback to the developers but can't make any promises on when or even if this behavior will be changed. For now, if you need parallel subflows to continue when a neutral status is returned, you may want to consider breaking them out into separate workflows.