Environments/Approvals Hold Runner Active

Feature request/bug?

When running a job that has an ‘environment’ specified w/protection rule that requires a response, the runner is still active - preventing this runner from processing other workflows for the repo (or organization, depending on runner scope).

I would have expected that when an environment is specified with a protection rule, rather than keep the agent busy (though essentially idle), the job execution is suspended at the moment intervention is required, and the runner is released into an idle state again. Once the manual gate is acknowledged, the workflow::job re-enters Pending state, or is cancelled accordingly.

It’s unfathomable to me that a manual gate may be reached for what could be an indefinite period of time while holding the resources/infrastructure that hosts this runner process hostage.

2 Likes

I would like at least a timeout to cancel the workflow :-/

Just to ‘close’ the loop here: there was a brief platform issue at the time that corresponded to the failures that I observed, which was confirmed by support. Sorry for taking to long to close the loop on this one!

The job does not hold a runner when pending. The job is rescheduled once a specific event occurs (i.e. an explicit response to an approval or the timeout event).

It’s funny that you mention this, because that was the first thing that completely floored me: if you are bothering to hold up a job for an approval response in the first place (because you are protecting an environment), why would you want to timeout and automatically approve? It is counter-intuitive to me. I would have imagined a timeout with a “default decision” that we might specify (reject or approve). Default reject of course. :slight_smile:

Also, I find measuring in seconds is a little awkward, although acceptable for a beta. I think the 30-day maximum is fine, but at least let us specify a unit in the form of d, h, m, s - with m for minute being the default. Testing aside, it’s unlikely that someone would want to wait less than a minute in a real-world scenario!