-
Notifications
You must be signed in to change notification settings - Fork 357
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
Include matrix information in debug artifact name #809
Conversation
ceffd9e
to
93e19ee
Compare
93e19ee
to
375c147
Compare
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.
The uploaded artifacts look good. Is there any reason why we're not running these tests using windows?
let suffix = ""; | ||
const matrix = actionsUtil.getRequiredInput("matrix"); | ||
if (matrix !== undefined && matrix !== "null") { | ||
for (const entry of Object.entries(JSON.parse(matrix)).sort()) |
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.
How does sort work if the keys are arrays? I did a little test and it seems to work. Also, we only need this functionality to ensure our tests work, so even if the sorting is not stable, if our tests pass consistently, I'm not too worried.
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.
I believe the default way to compare two arrays in TypeScript is lexicographically. Since in this case the first element is the key of a JSON map, we know that all the arrays will differ in their first element (since the keys must be unique), so this is equivalent to sorting by the name of the key.
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.
Meant to approve the first time, but clicked the wrong button. :)
Only that the bash script that checks the result wouldn't work on Windows (I think). |
Adds the contents of
matrix
to the name of the debug artifact to avoid issues with clashing names in matrixed runs.