-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Preparation work for Supporting matrix context in output keys #2477
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
Conversation
|
hallelujah, this is great news! Thank you.
is there a public issue we can watch? |
|
Hey @ajaykn 🖖 ! We just copy/paste you example as it was not working in our use case to see if we where doing something wrong but we have the same error. Are we missing something? 🤔 I guess it is still something missing due to the side-note:
Thanks for the work 🙇 |
|
Love it, just started getting stuck on this issue. To my untrained eye, the changes look like they only affect job outputs, not workflow outputs (for reusable workflows where the workflows are called with a matrix), is that a separate change? Because trying the same syntax on those gives me Edit: I re-checked the example and noticed it uses a hard-coded string to resolve the output, not something like |
|
Such a great improvement ! Do you have any ETA for this ? So that I know if I need to make a workaround or can just wait ! |
|
@srosell-uz , @caio-eiq Please note that there are still few more changes from server side. @griseau
We wil share more in blog post once the feature is completely baked. caller workflowcalled workflow
yes currently, we will not be supporting expressions inside an expression like |
|
expressions inside an expression is not required to access composed output keys.
This can be rewritten to |
|
Could we get an update when the server-side bits have been completed and are live so that the change described here can work please? (Note I am not asking for an ETA, just a note here when it's complete so that we know we can start using this change.) |
|
Hi all, unfortunately the team working on this feature has been laid off. I have no information on whether or not the work will be continued by another team or if the work has stopped completely. Its quite sad as it was very close to completion. cc @mph4 |
|
This is a real pity as this is a pretty serious feature gap. Not being able to get matrix per intersection outputs seriously impacts the usability of the matrix feature. |
|
There's no design documentation linked, so I am not sure what alternative syntax was considered, but templating in the field name seems to be a bit limiting because the user of the outputs will then have to enumerate all the needed field names somehow. This will either lead to a hard-coded, manual expansion of the matrix combinations, or some convoluted code to reuse the matrix definition. Why not allow nested objects so we can use the existing [object filter] feature? For example: outputs:
my_output:
key: ${{matrix.os}}
nested:
key: ${{matrix.arch}}
value: ...
# Usage:
${{jobs.x.outputs.my_output.*.*}}
${{jobs.x.outputs.my_output.linux.*}}
${{jobs.x.outputs.my_output.*.x64}}The last two use cases are almost impossible with the current syntax |
Wouldn't that be solvable with |
|
Can we please get an update on this? I understand the layoffs have occurred. Is there a PM/team who still has this in the product roadmap or is this indefinitely scrapped? |
|
Having this feature would make dynamic CICD with github actions a 💥 If there is any help we as community could contribute please let us know! |
|
Just investigated parameterising a few similar jobs using matrix and I am in total disbelief this functionality wasn't provided from the get-go. It's something that every user of the matrix feature would obviously want. |
|
Does it work in cloud runner? Because I got error just like srosell-ut |
|
It will not work until Github pushes backend changes to support this 😢 |
|
Is this still not solved? |
|
github, yet another ping on this. |
|
Any updates? |
|
Still looking for a resolution on this. |
|
I brought this up to multiple people from GitHub at GitHub Universe (a YEAR ago). And here we are...
|
|
Hey folks, I was leading this feature before layoffs happened at GitHub, its quite painful to see the activity on here, which I keep getting notifications for every time someone comments. While I'm no longer employed at GitHub I'm going to reach out to some folks and see if I can find someone willing to finish up this work. P.S. Don't let this get your hopes up too much. 💔 |
|
I'd just like to add that this nondeterministic behaviour isn't merely a feature request, this is a massive footgun in GitHub actions. The silently nondeterministic outputs are dangerous, especially for people that depend on GitHub Actions for reliable builds and production deploys. I had a look at some of the PRs referencing this issue, take this one, where this bug led to the incorrect helmchart being applied during a kubernetes apply 😱. If it is too much to ask that this feature is finished, I think it should at least raise a warning when you access a matrix job's output. This would be a good candidate for a GitHub Actions linter. |
|
its a pity that people working on such most requested feature has been laid off |
|
any updates on this? |
|
any news? |
|
Job outputs enable passing information into downstream job-level inputs. Artifacts generally work well for downstream step-level processing. Example solution using artifactsjobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
runs-on:
- ubuntu-latest
- windows-latest
steps:
- run: echo "${{ matrix.runs-on }}_RESULT=success" > "report-${{ matrix.runs-on }}.txt"
- uses: actions/upload-artifact@v4
with:
name: report-${{ matrix.runs-on }}
path: report-${{ matrix.runs-on }}.txt
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: report-*
merge-multiple: true
- run: cat report-*Can someone help me understand their concrete scenario where using artifacts doesn't work? |
This has been suggested before in previous comments on this issue. It's a hacky work-around at best. It pollutes the end-user visible artifacts with build-related data.
Needing this is a while ago for me (and my previous job, so I don't really have any skin in this game any more) so I don't recall the details, but IIRC it fell down with dynamically determined matrix axes. |
|
yeah, artifacts has been mentioned and a similar example given here: #2477 (comment) |
|
please help |
|
Another request for this feature. I'm running all jobs in a workflow as a matrix, so that the jobs run in parallel on 6 different operating systems. Currently working around this by using a job output per OS, so 6 job outputs. It's a bit messy. |
|
This feature would really make the matrix feature more usable. |
|
My workaround is to upload a unique artifact for each matrix job and then I download all artifacts with a |
☝️💯
|
Sadly its true .... This feature would make Github actions such a epic system! If any1 from Github is reading this .... Get me on board and I promise I will only work on delivering this feature 🤣 |
|
The artifact workaround works for some cases, but not all. Specifically, if the output is going to be used in a subsequent job's |
Artifacts should work if you add an intermediate job which would download the artifacts, process them and return the results as normal job outputs; then another job could use the values of those outputs. |
How big and complicated (and fragile!) do these Rube Goldberg machines have to get before this issue gets resolved? |
that's what we do. |
mrwutthisan1990-glitch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|

Please note that this is not supported yet, and Server side changes are still in-progess
we will release a changelog when supported end to end.
Currently outputs for matrix jobs are represented by a single output and only the last successful matrix job is used to populate the output. This prevents users from being able to target output from a specific job and can lead to unpredictable results since the matrix jobs don't run in a guaranteed order.
So as part of the improvements, we want to support
Allow the
matrix contextto be used to define the output variable name. This allows users to make the output completely deterministic if they choose to include all dimensions of the matrix in their key.Example using all dimensions in output key:
Please note that: Server side changes are still in-progess.