-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Make the performance tests more stable #48094
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,13 +166,15 @@ export async function openPreviousGlobalStylesPanel() { | |
* Enters edit mode. | ||
*/ | ||
export async function enterEditMode() { | ||
const isViewMode = await page.$( | ||
'.edit-site-visual-editor__editor-canvas[role="button"]' | ||
); | ||
// This check is necessary for the performance tests in old branches | ||
// where the site editor toggle was not implemented yet. | ||
if ( ! isViewMode ) { | ||
return; | ||
try { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change is not necessary but I think it's a bit safer than the previous code, so I decided to leave it. |
||
await page.waitForSelector( | ||
'.edit-site-visual-editor__editor-canvas[role="button"]', | ||
{ timeout: 3000 } | ||
); | ||
|
||
await canvas().click( 'body' ); | ||
} catch { | ||
// This catch is necessary for the performance tests in old branches | ||
// where the site editor toggle was not implemented yet. | ||
} | ||
await canvas().click( 'body' ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In #45737 we've introduced a potential optimization to the performance job, the problem is that it resulted in the job comparing the wrong thing.
Basically if a branch was equivalent to the "test branch", we reused the same code to gain some time and avoid the git clone, the issue is that we didn't build the code in that case, meaning we were using the WP trunk version of Gutenberg and not the actual branch.
(Currently WP trunk's version does have the
'/navigation/single'
support in the site editor which explains why this random change fixed the perf job.The bummer is that you can say that for the last three months, the perf jobs in PRs were useless.
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.
That also explains why I was completely unable to repro locally. 💥
Nice catch, though the bug is indeed a nasty one! 🐛
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.
/cc @kevin940726 @t-hamano