Fix running performance tests locally via CLI#49068
Conversation
|
Size Change: +294 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
|
2509edd fixes the issue where the branch name is not sanitized and breaks the path or filename it's used in, ultimately failing the test. For example, before the fix this is what you'd see when running with this branch: (☝️ Note the This also fixes #48920 |
youknowriad
left a comment
There was a problem hiding this comment.
Cool. I appreciate all these fixes. 👍 Is this going to fix the release jobs too?
It should fix them, yes. The reason they're failing is that they use branch names that need sanitizing before being used as a part of the output results filename, e.g. |
What?
Fixes #49059
Fixes #48920
How?
Docker/
wp-envis missing the$USERenv var, which he complains about when running the perf tests locally via the CLI. For example, running./bin/plugin/cli.js perf trunk your-branchlocally will throw the following error:Sanitize the branch name before using it as a part of path or results filename.
Testing Instructions
On a Mac with Docker desktop (I don't know if it also fails in other envs):
wp-envcontainers,trunk,./bin/plugin/cli.js perf trunk fix/running-perf-tests-locallyfix/running-perf-tests-locally./bin/plugin/cli.js perf trunk fix/running-perf-tests-locallyagain,Go to the perf tests page and run the workflow manually using this branch as a base:
This will trigger the "custom comparison" step with branch names invalid as filenames, which is what breaks the release job. It should pass. See this example job that I've triggered.