Skip to content

mach: Allow updating test result metadata from GitHub Action run#41257

Merged
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:allow-updating-test-results-from-action-run
Dec 15, 2025
Merged

mach: Allow updating test result metadata from GitHub Action run#41257
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:allow-updating-test-results-from-action-run

Conversation

@mrobinson
Copy link
Copy Markdown
Member

This change allows ./mach update-wpt to accept a URL to a GitHub
Action run. If a URL is passed, it will attempt to download the stable
unexpected results from the run and update the expected test results.
Note that this currently requires having the gh command-line tool
installed and authenticated. Although you can download artifacts without
logging in via the web interface, doing this via the API requires an
access token.

Testing: This change adds a unit test for the regex that matches GitHub Action URLs.

This change allows `./mach update-wpt` to accept a URL to a GitHub
Action run. If a URL is passed, it will attempt to download the stable
unexpected results from the run and update the expected test results.
Note that this currently requires having the `gh` command-line tool
installed and authenticated. Although you can download artifacts without
logging in via the web interface, doing this via the API requires an
access token.

Signed-off-by: Martin Robinson <[email protected]>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 14, 2025
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test.

!= 0
):
print(f"Could not download artifact from run id {run_id}.")
print("Is `gh` installed and authenticated?")
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ` around gh here probably won't work as we want? Maybe something else to do the format.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, this doesn't do anything special. I just put these here to make it clear that it is a command-line tool, but I can remove it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's okay with you, I'll land this as is. I think the quotes here do help with reading this a bit more easily, even though they don't change the formatting of the string.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a super nit anyway. What I had in mind is something like
\033[32mgh\033[0m

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Dec 14, 2025
@mrobinson mrobinson added this pull request to the merge queue Dec 15, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 15, 2025
Merged via the queue into servo:main with commit d7b6aaf Dec 15, 2025
32 checks passed
@mrobinson mrobinson deleted the allow-updating-test-results-from-action-run branch December 15, 2025 09:49
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 15, 2025
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.

3 participants