-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
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 |
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.
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-env
is missing the$USER
env var, which he complains about when running the perf tests locally via the CLI. For example, running./bin/plugin/cli.js perf trunk your-branch
locally 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-env
containers,trunk
,./bin/plugin/cli.js perf trunk fix/running-perf-tests-locally
fix/running-perf-tests-locally
./bin/plugin/cli.js perf trunk fix/running-perf-tests-locally
again,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.