Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout setting does not work #47

Open
alexkuklin opened this issue Oct 4, 2022 · 10 comments
Open

Timeout setting does not work #47

alexkuklin opened this issue Oct 4, 2022 · 10 comments
Labels
needs-info Needs more information from the author

Comments

@alexkuklin
Copy link

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.
@sheeeng
Copy link

sheeeng commented Oct 10, 2022

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

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

@trstringer
Copy link
Owner

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

@trstringer trstringer added the needs-info Needs more information from the author label Oct 27, 2022
@alexkuklin
Copy link
Author

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

not yet, will do, thanks

@devszr
Copy link

devszr commented Dec 15, 2022

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:

@sheeeng
Copy link

sheeeng commented Dec 22, 2022

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.

@devszr
Copy link

devszr commented Jan 31, 2023

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 }}

@lguerrero-1807
Copy link

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?

@devszr
Copy link

devszr commented Jun 30, 2023

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

@lguerrero-1807
Copy link

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

@pedro-gordo
Copy link

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: actions/runner#1979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Needs more information from the author
Projects
None yet
Development

No branches or pull requests

6 participants