Ephemeral runners unable to run workflows, only a single job
Describe the bug The first job executed on an ephemeral runner always triggers ACTIONS_RUNNER_HOOK_JOB_COMPLETED when this should be reserved for the end of a workflow.
To Reproduce Steps to reproduce the behavior:
- Create an ephemeral runner
- have two jobs in a workflow depend on it
- First job triggers ACTIONS_RUNNER_HOOK_JOB_COMPLETED, which deletes the runner
- Second, or subsequent jobs either wait forever or die part way through as the ephemeral runner is deleted
Expected behavior ACTIONS_RUNNER_HOOK_JOB_COMPLETED should be only triggered at the end of a designated workflow, not each job.
Runner Version and Platform
Latest, self hosted ephemeral
OS of the machine running the runner? OSX/Windows/Linux/... Linux, nothing to do with OS
What's not working?
Jobs hang, don't finish, or error out in a workflow in the UI.
Job Log Output
Runner and Worker's Diagnostic Logs
More importantly ACTIONS_RUNNER_HOOK_JOB_COMPLETED seems to only run AFTER the first job, but fails to be executed after subsequent jobs. Conversely ACTIONS_RUNNER_HOOK_JOB_STARTED always runs at the beginning of a job, but the JOB_COMPLETED doesn't.
Hello @dv01d,
With ephemeral runners, they execute only a single job—not the entire workflow.
The hooks ACTIONS_RUNNER_HOOK_JOB_STARTED and ACTIONS_RUNNER_HOOK_JOB_COMPLETED are triggered before a job starts and after it ends, respectively.
Do you see any workflow logs that ACTIONS_RUNNER_HOOK_JOB_COMPLETED hook is executed/run ? Are there some errors ?
In my setup, the hooks are working as expected. The ACTIONS_RUNNER_HOOK_JOB_COMPLETED hook is triggered after every end of job
No errors, it just doesn’t get executed. Perhaps as it was intended to only run for a single job. Seems strange that it could or would pick up any subsequent jobs if it was intended to only run a single job. Although even stranger that it runs the job started when it is running additional jobs, but never the job completed.