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

Ephemeral runners unable to run workflows, only a single job #3638

Open
dv01d opened this issue Jan 7, 2025 · 3 comments
Open

Ephemeral runners unable to run workflows, only a single job #3638

dv01d opened this issue Jan 7, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@dv01d
Copy link

dv01d commented Jan 7, 2025

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:

  1. Create an ephemeral runner
  2. have two jobs in a workflow depend on it
  3. First job triggers ACTIONS_RUNNER_HOOK_JOB_COMPLETED, which deletes the runner
  4. 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

@dv01d dv01d added the bug Something isn't working label Jan 7, 2025
@dv01d
Copy link
Author

dv01d commented Jan 17, 2025

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.

@MaUhlik-cen56998
Copy link

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

@dv01d
Copy link
Author

dv01d commented Jan 26, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants