You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For users of the matrix-output action this means we're not being as efficient as we could be with parallelized work. In certain scenarios it is possible to use reusable workflows to solve the output and dependency problem. However, scenarios where a dependent job has multiple dependencies from the matrix wouldn't work.
We could extend matrix-output to be more efficient with dependencies by introducing another action which could be used a wait-for-dependency step as part of another job.
Here are some of the known challenges with implementing this additional action:
We cannot rely on using the artifacts created by matrix-output to determine when a job completes as a failed job typically not produce an artifact. We should instead use the API call /repos/{owner}/{repo}/actions/runs/{run_id}/jobs for determining the completed state of a job.
The user needs to specify some identifying information so we can identify the specific job's completion state as well as determining which matrix-output artifact to download.
We can use the GitHub API numeric job id to monitor the completion state of a job.
The job_id (I'll refer to this a the "job key") referred to by github.job (the YAML key used in jobs) is not a field within the GitHub API response for jobs.
At this time GitHub Actions job dependency system via
needs
requires that all jobs in a matrix must be completed before the dependent job has started (GitHub discussion: https://github.com/orgs/community/discussions/42335).For users of the
matrix-output
action this means we're not being as efficient as we could be with parallelized work. In certain scenarios it is possible to use reusable workflows to solve the output and dependency problem. However, scenarios where a dependent job has multiple dependencies from the matrix wouldn't work.We could extend
matrix-output
to be more efficient with dependencies by introducing another action which could be used a wait-for-dependency step as part of another job./repos/{owner}/{repo}/actions/runs/{run_id}/jobs?filter=latest
to determine when a job has completed.matrix-output
to simulate theneeds.<job_key>.outputs.<output_key>
through thesteps
context.Here are some of the known challenges with implementing this additional action:
matrix-output
to determine when a job completes as a failed job typically not produce an artifact. We should instead use the API call/repos/{owner}/{repo}/actions/runs/{run_id}/jobs
for determining the completed state of a job.matrix-output
artifact to download.id
to monitor the completion state of a job.job_id
(I'll refer to this a the "job key") referred to bygithub.job
(the YAML key used injobs
) is not a field within the GitHub API response for jobs.id
is not available within a GHA context: https://github.com/orgs/community/discussions/8945The text was updated successfully, but these errors were encountered: