Page MenuHomePhabricator

[QB] LibraryUpgrade fails for Query Builder due to missing Cypress dependency: Xvfb
Open, Needs TriagePublic

Description

LibraryUpgrader is configured to update the Query Builder repository. However, it fails consistently when trying to run the browser tests that are part of npm run test in that repository.

The relevant error message is:

Your system is missing the dependency: Xvfb

from: https://libraryupgrader2.wmcloud.org/logs2/963286 (see https://libraryupgrader2.wmcloud.org/r/wikidata/query-builder?branch=main for the current logs)

Potential ways forward:

  • is LibUp intended to run browser tests? If no, then maybe we can check for xvfb and skip Cypress if xvfb is not there
  • see if we can run browser tests in the LibUp image without xvfb (is Firefox or Chrome available?)
  • add xvfb to the LibUp image
  • disable LibUp trying to update Query Builder

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

firefox-esr should be installed in the container - we can install xvfb if necessary but I was under the (possibly mistaken!) impression that we had switched to browser's native headless modes instead of needing xvfb.

firefox-esr should be installed in the container - we can install xvfb if necessary but I was under the (possibly mistaken!) impression that we had switched to browser's native headless modes instead of needing xvfb.

Ah, thanks! That is good to know! Currently, it tries to run Chromium, but I'll write a small script that will just try different options.

Change 902130 had a related patch set uploaded (by Michael Große; author: Michael Große):

[wikidata/query-builder@master] Make LibUp work by being flexible with Cypress browser

https://gerrit.wikimedia.org/r/902130

Change 902130 merged by jenkins-bot:

[wikidata/query-builder@master] Make LibUp work by being flexible with Cypress browser

https://gerrit.wikimedia.org/r/902130

Michael changed the task status from Open to Stalled.Mar 28 2023, 2:02 PM

So, that patch helped. Now it is failing on updating netlify-cli:

https://libraryupgrader2.wmcloud.org/logs2/977154
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for @esbuild/android-arm@0.16.17: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    android
npm ERR! notsup Valid Arch:  arm
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     /cache/_logs/2023-03-27T22_37_02_032Z-debug-0.log

However, this is actually due to a bug in netlify-cli itself: netlify/cli#5323. I hope that this will be fixed soon by this PR: netlify/cli#5547.

I'm marking this as stalled for now, because we can't do anything until that problem is fixed upstream. (Or are there options to exclude certain dependencies from LibUp?)

It looks like the latest run is failing with Xvfb stuff again?

> @wmde/query-builder@1.0.0 cypress
> unset DISPLAY && CYPRESS_API_URL=${VUE_APP_WIKIBASE_API_URL} CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:8080} cypress run --browser "$(./cypress/figureOutBrowser.sh)" --headless

It looks like this is your first time using Cypress: 12.12.0

[STARTED] Task without title.
Your system is missing the dependency: Xvfb

Install Xvfb and run Cypress again.

Read our documentation on dependencies for more information:

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------

Error: spawn Xvfb ENOENT

----------

Platform: linux-x64 (Debian - 11.6)
Cypress Version: 12.12.0

--- end ---
Michael changed the task status from Stalled to Open.Aug 29 2023, 2:00 PM

Meh. Would be useful to see what the ./cypress/figureOutBrowser.sh script returned.

But the netlify PR has been merged, so maybe at least that issue there might be resolved and this task is no longer stalled.

ItamarWMDE renamed this task from LibraryUpgrade fails for Query Builder due to missing Cypress dependency: Xvfb to [QB] LibraryUpgrade fails for Query Builder due to missing Cypress dependency: Xvfb.Sep 20 2023, 2:34 PM

Task Review:

  • We should consider whether this is still relevant if we are seriously considering moving to gitlab.

Task Prio Notes:

  • Does not affect end users / production
  • Does not affect monitoring
  • Might affect development
  • Does not affect onboarding
  • Does not affect additional stakeholders