Describe the enhancement
- Provide a way to force-cancel any action run despite its running conditions.
- Improve feedback in the UI and API when re-evaluating the running conditions did not cancel the action run.
Context
As for today I found myself unable to cancel one action of my workflows.
I understand that due to its setup, the "cancel run" button was not working as I expected.
The conditions that were met:
- The
job has a run condition set to always()
- The action ran into a dead-lock
To cancel the action, I tried:
- Use the
cancel run in the actions UI.
- I used
gh client as follow
Received
✓ Request to cancel workflow submitted.
Non of the steps above provided information whether the action run was cancelled or not.
Looking through the documentation I found this:
To cancel the workflow run, the server re-evaluates if conditions for all currently running jobs. If the condition evaluates to true, the job will not get canceled. For example, the condition if: always() would evaluate to true and the job continues to run. When there is no condition, that is the equivalent of the condition if: success(), which only runs if the previous step finished successfully.
With this in mind, I think I will have to wait 6 hours for the default time out that jobs have.
Code Snippet
To try this out
name: dead-lock
on:
workflow_dispatch:
jobs:
run:
if: always()
runs-on: ubuntu-latest
# force the action to stop
timeout-minutes: 5
steps:
- run: |
for i in {0..9999}; do
sleep 1
done
Once the action is dispatched try to cancel it
Additional information
Add any other context about the feature here.
NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md
Describe the enhancement
Context
As for today I found myself unable to cancel one action of my workflows.
I understand that due to its setup, the "cancel run" button was not working as I expected.
The conditions that were met:
jobhas a run condition set toalways()To cancel the action, I tried:
cancel runin the actions UI.ghclient as followReceived
Non of the steps above provided information whether the action run was cancelled or not.
Looking through the documentation I found this:
With this in mind, I think I will have to wait 6 hours for the default time out that jobs have.
Code Snippet
To try this out
Once the action is dispatched try to cancel it
Additional information
Add any other context about the feature here.
NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md