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

[Feature]: Set a "global" timeout for the entire workflow #95

Open
1 task
AndrewFarley opened this issue Jan 14, 2023 · 3 comments
Open
1 task

[Feature]: Set a "global" timeout for the entire workflow #95

AndrewFarley opened this issue Jan 14, 2023 · 3 comments
Labels
idea New feature proposal

Comments

@AndrewFarley
Copy link
Contributor

What happened?

I'd like to be able to set a job-level timeout for the entire job, not just per-step. This is vital for being able to use StepCI in a type of regular usage scheduled on a cron without having it "overlap" the next run.

What did you expect to happen?

If I could have a configuration such as...

version: "1.1"
name: Sample Workflow
tests:
  example:
    timeout: 20000  # Max of 20 seconds for the entire job
    steps:
      - name: Step 1 - Example Basic Auth with headers, and retries
         http:
           timeout: 10000
           retries: 1
           url: https://google.com/BasicAuth
           method: GET
           auth:
             basic:
               username: hello
               password: world
           check:
             status: "/^20/"
      - name: Step 2 - Example with params
         http:
           timeout: 10000
           url: https://google.com/QueryParams
           method: GET
           params:
             hello: world
             world: hello
          check:
            status: "/^20/"
      - name: Step 3 - CSS Selector
         http:
           timeout: 10000
           url: https://google.com/QueryParams
           method: GET
           check:
             selectors:
               title: Google

With this above configuration, your run would never take longer than 20 seconds, even though you have enough timeouts in the 3 steps present which COULD take it to 30 seconds. But because of the global timeout, if all the different steps timeout and take their max time, by the end of the second one the job will exit out (having had 20 seconds go by) and it would never execute the third one.

Version

HEAD/Latest as of Jan 15, 2023

Environment

node: ~18.x

How can we reproduce this bug?

No response

Relevant log output

No response

Would you be interested in working on a bugfix for this issue?

  • Yes! Assign me
@AndrewFarley AndrewFarley added the bug Something isn't working label Jan 14, 2023
@AndrewFarley
Copy link
Contributor Author

Note: This may only be relevant and might want to be moved into the stepci/runner codebase.

@mishushakov
Copy link
Member

Thank for starting the issue,
Keep in mind, you can already specify timeout in your CI/CD

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes

@AndrewFarley
Copy link
Contributor Author

AndrewFarley commented Jan 17, 2023

@mishushakov Timing it out elsewhere isn't handling it gracefully with a proper resultset map about the failure and what occurred and at what step it failed/stalled at. That doesn't really solve the underlying issue.

Note: I'd be happy to sponsor someone to add this feature if anyone's down

@mishushakov mishushakov added idea New feature proposal and removed bug Something isn't working labels Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea New feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants