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 request: Wait/block until an artifact is actually available #25

Open
smuuf opened this issue Mar 27, 2020 · 3 comments · May be fixed by #347
Open

Feature request: Wait/block until an artifact is actually available #25

smuuf opened this issue Mar 27, 2020 · 3 comments · May be fixed by #347
Labels
enhancement New feature or request

Comments

@smuuf
Copy link

smuuf commented Mar 27, 2020

The idea is that this would introduce better options for parallelization inside a workflow.

If I understand right, currently only jobs can need (wait) for other jobs to finish.

If job B expects an artifact from job A, it must wait for job A to finish completely.

If job B was able to wait (block) for some artifact from job A, it would allow us to run both jobs at the same time and do their stuff (for example build Docker images and prepare other stuff, which can take quite a lot of time) simultaneously. Then, job B could simply wait until job A uploads expected artifact - and then job B could continue, being sure that it has everything it needs.

Obviously some kind of timeout configuration should be possible (mandatory?), after which the step would fail, if the expected artifact never appeared.

I'm just wondering if such idea makes sense to anyone else, too? 🤔 Or is there already some way how to do this kind of thing?

@konradpabjan konradpabjan added the enhancement New feature or request label May 11, 2020
@vaind
Copy link

vaind commented Feb 11, 2022

At the very simplest, I imagine this could be implemented by waiting for the job to finish - poll the API and wait for the target job status to change to one of the final states (success/failure): https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run. This would introduce new settings:

  • [required] name of the job that produces the artifact
  • [optional] poll interval
  • [optional] timeout

@vaind
Copy link

vaind commented Mar 4, 2022

For anyone interested, I've taken a stab at this (and am starting to use it in GA workflows) - feel free to have a look at #139 and test the changes from my repository (use commit hash instead of a version)

@vaind vaind linked a pull request Aug 15, 2024 that will close this issue
@vaind
Copy link

vaind commented Aug 15, 2024

I've added another PR for this after the previous one grew outdated: #347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants