Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#62822 closed defect (bug) (fixed)

Playwright Host validation warning when running core performance tests

Reported by: johnbillion's profile johnbillion Owned by: swissspidy's profile swissspidy
Milestone: 6.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: performance Cc:

Description

When the core performance tests run on GitHub Actions, the following warning is shown:

Playwright Host validation warning: 
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Please install them with the following command:      ║
║                                                      ║
║     sudo npx playwright install-deps                 ║
║                                                      ║
║ Alternatively, use apt:                              ║
║     sudo apt-get install libwoff1\                   ║
║         libvpx9\                                     ║
║         libevent-2.1-7t64\                           ║
║         libopus0\                                    ║
║         libgstreamer-plugins-base1.0-0\              ║
║         libgstreamer-gl1.0-0\                        ║
║         libgstreamer-plugins-bad1.0-0\               ║
║         libharfbuzz-icu0\                            ║
║         libsecret-1-0\                               ║
║         libhyphen0\                                  ║
║         libmanette-0.2-0\                            ║
║         libflite1\                                   ║
║         libgles2\                                    ║
║         gstreamer1.0-libav                           ║
║                                                      ║
║ <3 Playwright Team                                   ║
╚══════════════════════════════════════════════════════╝

Here's an example workflow run: https://github.com/WordPress/wordpress-develop/actions/runs/12837240085/job/35800503468 (expand the "Run performance tests" section.

Is this something to be concerned about?

Change History (11)

#1 follow-up: @swissspidy
4 months ago

  • Keywords 2nd-opinion added

@mukesh27 recently mentioned this too, but these are for video codecs and specific fonts, so not really relevant for these tests IMO

#2 @euthelup
4 months ago

What is interesting tho is that in the initial steps, the browser dependencies are being installed with npx playwright install --with-deps chromium and the step seems to be completed successfully.

I suspect this might be caused by the --with-deps chromium argument because in the tests we are using Chromium and Firefox.

Should I try a PR with only npx playwright install --with-deps? Or maybe the video codecs are not very useful and we can live with the warning.

#3 in reply to: ↑ 1 @mukesh27
4 months ago

Replying to swissspidy:

@mukesh27 recently mentioned this too, but these are for video codecs and specific fonts, so not really relevant for these tests IMO

See https://github.com/WordPress/wordpress-develop/pull/6515#issuecomment-2558969836

#4 follow-up: @swissspidy
4 months ago

We don‘t use Firefox though

#5 in reply to: ↑ 4 @euthelup
4 months ago

Replying to swissspidy:

We don‘t use Firefox though

Oh, got it, so basically wp-scripts is downloading Firefox even though we already downloaded the browser deps.

I took a look over wp-scripts, and it seems PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD was added exactly for this case.

I'll try to give it a stab tonight if no one else is in a rush for it.

This ticket was mentioned in PR #8150 on WordPress/wordpress-develop by @euthelup.


4 months ago
#6

  • Keywords has-patch added

#7 @euthelup
4 months ago

I've provided a PR that adds the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD environment to the performance tests, and the warning will disappear.

There is still a catch! Because the performance GitHub action uses an absolute link to the reusable-perfomance.yml step, the changes in my PR won't have an effect, and the warning will still be shown.

To demonstrate this change fixes the issue I've created two separate PRs in my own fork to trigger the performance GitHub action with my own .yml files.

  • This PR workflow was triggered with PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true and the warning is gone
  • This PR workflow was triggered with PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: false and it does have the warning

This ticket was mentioned in PR #8151 on WordPress/wordpress-develop by @mukesh27.


4 months ago
#8

PLEASE DO NOT REVIEW.

#9 @mukesh27
4 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 6.8

@euthelup I’ve opened PR https://github.com/WordPress/wordpress-develop/pull/8151 to validate this https://github.com/WordPress/wordpress-develop/actions/runs/12880328016/job/35909167990?pr=8151#step:25:22. It’s working fine—the notice is gone, and no Firefox browser is being downloaded now.

The PR you raised makes sense and looks good to me.

Last edited 4 months ago by mukesh27 (previous) (diff)

#10 @swissspidy
4 months ago

  • Owner set to swissspidy
  • Resolution set to fixed
  • Status changed from new to closed

In 59669:

Build/Test Tools: Do not download extra browsers in performance tests.

Props euthelup, johnbillion, mukesh27.
Fixes #62822.

Note: See TracTickets for help on using tickets.