Support setting job timeout-minutes globally for a workflow #10690
Replies: 8 comments 2 replies
-
Hi @toast-gear, this is useful feedback. I've added this to the backlog. Thanks! |
Beta Was this translation helpful? Give feedback.
-
If the timeout applies to jobs then it should be at the root level: default:
timeout-minutes: 60 Otherwise I'm supporting and hoping for this feature to be implemented |
Beta Was this translation helpful? Give feedback.
-
Extrapolating on this idea, would it be possible to set a default timeout policy for i.e. GitHub Enterprise runners' timeout? Our specific usecase is that we want runners to timeout after say 15 minutes by default. |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
-
Any progress on adding a top level workflow |
Beta Was this translation helpful? Give feedback.
-
Please make this happen 🙏 Adding timeouts in multiple places is not as convenient as having a global timeout. Or maybe an option like the one mentioned at https://github.com/orgs/community/discussions/14834 |
Beta Was this translation helpful? Give feedback.
-
Describe the enhancement
As part of the
default
attribute it would be great if you could set thetimeout-minutes
attribute so you don't need to set a timeout in every job. This will apply to each job independently. You can then override this default global level at the job or step level if those steps or jobs need a different timeout.With the current default being set to 6 hours almost every job in every workflow needs a
timeout-minutes
attribute set. I don't mind the default being high, I understand a high timeout reduces confusion, but it is inane that you end up having to set a timeout at every job in every workflow as a result instead of just once at the global level per workflow.It's worth noting that I am talking about setting the job timeouts globally, not a timeout on the total workflow run time which would be introducing new behaviour. Someone might find a timeout on the workflow run useful but I would think that enhancement would be much more involved. This enhancement would cover most people's needs and is just reducing the amount of syntax you write without changing any behaviour.
Code Snippet
The below would mean every job in that workflow would have its timeout set to 60 minutes.
https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#defaults
https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes
Beta Was this translation helpful? Give feedback.
All reactions