manual-approval icon indicating copy to clipboard operation
manual-approval copied to clipboard

Timeout setting does not work

Open alexkuklin opened this issue 3 years ago • 10 comments

I've set

         timeout-minutes: 3

and it does not seem to work out. Cancelled it manually after 7 minutes:

Tue, 04 Oct 2022 14:03:25 GMT
Respond "approved", "approve", "lgtm", "yes" to continue workflow or "denied", "deny", "no" to cancel.
Tue, 04 Oct 2022 14:03:26 GMT
Workflow status: Pending
...
Tue, 04 Oct 2022 14:10:28 GMT
Workflow status: Pending
Tue, 04 Oct 2022 14:10:35 GMT
Workflow cancelled, closing issue.
Tue, 04 Oct 2022 14:10:37 GMT
Error: The operation was canceled.

alexkuklin avatar Oct 04 '22 14:10 alexkuklin

Did you check that the timeout-minutes located outside of the with: block? See #48.

      - uses: trstringer/manual-approval@v1
        timeout-minutes: 5

sheeeng avatar Oct 10 '22 08:10 sheeeng

Thanks for helping, @sheeeng! @alexkuklin, did that work for you?

trstringer avatar Oct 27 '22 19:10 trstringer

Thanks for helping, @sheeeng! @alexkuklin, did that work for you?

not yet, will do, thanks

alexkuklin avatar Oct 27 '22 19:10 alexkuklin

I seem to have a problem using timeout-minutes too. I'm trying to pick it up from an environment variable but get the following error when the pipeline is executed. It still runs without a timeout, but this is logged:

An error occurred when attempting to determine the step timeout.
 Unexpected value '60'

I have this at the top of my yml

env:
  MIN_APPROVALS: 1
  TIMEOUT_MINUTES: 60

and this in my step

uses: trstringer/[email protected]
timeout-minutes: ${{ env.TIMEOUT_MINUTES }}
with:

devszr avatar Dec 15 '22 16:12 devszr

I seem to have a problem using timeout-minutes too. I'm trying to pick it up from an environment variable but get the following error when the pipeline is executed. It still runs without a timeout, but this is logged:

An error occurred when attempting to determine the step timeout.

Hi @devszr, sorry to hear that you still experiencing the issue.

Could you share with us a minimal working GitHub Actions workflow file that reproduce the issue?

It will help us to understand the issue.

sheeeng avatar Dec 22 '22 09:12 sheeeng

Apologies for the delayed response. I recently installed a YAML syntax checker in VS Code and it seems to mark my timeout-minutes line with an error and provides this message.

Incorrect type. Expected "number".yaml-schema: GitHub Workflow

Could this mean that the timeout-minutes cannot be passed as an env variable like

timeout-minutes: ${{ env.TIMEOUT_MINUTES }}

devszr avatar Jan 31 '23 15:01 devszr

Hi everybody, same problem here. Even when I setup a timeout option it's not work.

  - name: Manual Approve
    uses: trstringer/manual-approval@v1
    with:
      timeout-minutes: 3
      secret: ${{ steps.generate_token.outputs.token }}
      approvers: my-team
      minimum-approvals: 1
      exclude-workflow-initiator-as-approver: false

Is anybody that could solve the problem?

lguerrero-1807 avatar Jun 30 '23 13:06 lguerrero-1807

Hi everybody, same problem here. Even when I setup a timeout option it's not work.

  - name: Manual Approve
    uses: trstringer/manual-approval@v1
    with:
      timeout-minutes: 3
      secret: ${{ steps.generate_token.outputs.token }}
      approvers: my-team
      minimum-approvals: 1
      exclude-workflow-initiator-as-approver: false

Is anybody that could solve the problem?

In your case, try moving the timeout-minutes out of with:, like this:

 - name: Manual Approve
     uses: trstringer/manual-approval@v1
     timeout-minutes: 3
     with:       
       secret: ${{ steps.generate_token.outputs.token }}
       approvers: my-team
       minimum-approvals: 1
       exclude-workflow-initiator-as-approver: false

devszr avatar Jun 30 '23 13:06 devszr

Hi everybody, same problem here. Even when I setup a timeout option it's not work.

  - name: Manual Approve
    uses: trstringer/manual-approval@v1
    with:
      timeout-minutes: 3
      secret: ${{ steps.generate_token.outputs.token }}
      approvers: my-team
      minimum-approvals: 1
      exclude-workflow-initiator-as-approver: false

Is anybody that could solve the problem?

In your case, try moving the timeout-minutes out of with:, like this:

 - name: Manual Approve
     uses: trstringer/manual-approval@v1
     timeout-minutes: 3
     with:       
       secret: ${{ steps.generate_token.outputs.token }}
       approvers: my-team
       minimum-approvals: 1
       exclude-workflow-initiator-as-approver: false

It's work perfect here after change the timeout-minutes outside 'with' block. Thanks

lguerrero-1807 avatar Jun 30 '23 14:06 lguerrero-1807

If you use composite runs, the timeout-minutes won't work: https://github.com/actions/runner/blob/main/docs/adrs/0549-composite-run-steps.md#composite-run-steps-features

Open issue: https://github.com/actions/runner/issues/1979

pedro-gordo avatar Oct 04 '23 09:10 pedro-gordo