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

Include matrix information in debug artifact name #809

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

edoardopirovano
Copy link
Contributor

@edoardopirovano edoardopirovano commented Nov 4, 2021

Adds the contents of matrix to the name of the debug artifact to avoid issues with clashing names in matrixed runs.

@edoardopirovano edoardopirovano changed the title Include run ID in debug artifact name Include matrix information in debug artifact name Nov 4, 2021
@edoardopirovano edoardopirovano marked this pull request as ready for review November 4, 2021 19:27
@edoardopirovano edoardopirovano requested a review from a team as a code owner November 4, 2021 19:27
Copy link
Contributor

@aeisenberg aeisenberg left a 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())
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@aeisenberg aeisenberg left a 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. :)

@aeisenberg aeisenberg merged commit ea16943 into github:main Nov 4, 2021
@edoardopirovano
Copy link
Contributor Author

Is there any reason why we're not running these tests using windows?

Only that the bash script that checks the result wouldn't work on Windows (I think).

@edoardopirovano edoardopirovano deleted the include-run-id branch November 5, 2021 08:36
@github-actions github-actions bot mentioned this pull request Nov 8, 2021
5 tasks
This was referenced Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants