Page MenuHomePhabricator

Browser tests failing in EntitySchema secondary CI: “Schema Viewing Page accepts statements of entity schema data value type”
Closed, ResolvedPublic

Description

Schema Viewing Page
  1) accepts statements of entity schema data value type


0 passing (18s)
1 failing

1) Schema Viewing Page
     accepts statements of entity schema data value type:
   AssertionError: Timed out retrying after 4000ms: Expected to find element: `span.wikibase-toolbar-button-add`, but never found it.
    at ViewPropertyPage.openAddStatementForm (webpack://EntitySchema/./cypress/support/pageObjects/ViewPropertyPage.js:8:5)
    at Context.eval (webpack://EntitySchema/./cypress/e2e/addEntitySchemaStatement.cy.js:35:6)

Looks very similar to T366582: EntitySchema secondary CI failing. Last successful build was 2024-07-25, first failed build 2024-07-26, which matches the merge of DevelopmentSettings: Enable temp user autocreation. At the time, EntitySchema didn’t support temporary accounts yet (T356148), so this wasn’t fully surprising, but in the meantime we implemented that support and yet the browser tests remain broken – so we need to figure out what else is going on.

Event Timeline

Oh nice, the Cypress screen recording actually ends up in the GitHub artifacts we can download! Here it is reencoded to webm (from this build, currently the latest one):

The schema and property are successfully created, but then the property never becomes properly editable for some reason. There’s probably an error we can’t see in the browser console…

FWIW, the test works for me locally (because of course it does :/)

I guess the next step would either be to try to get more logging in CI, or try to recreate the CI wiki setup locally in a fresh MediaWiki install.

cypress-terminal-support might be useful to get more visibility. (Remember that we can always test the secondary CI by pushing directly to temporary GItHub branches, by the way.)

I do get an error for that spec locally, but it's a slightly different one, in case that helps:

  1) Schema Viewing Page
       accepts statements of entity schema data value type:
     CypressError: Timed out retrying after 4050ms: `cy.click()` failed because this element:

`<a href="/w/index.php?title=EntitySchema:E131" title="EntitySchema:E131" lang="en">browser...</a>`

is being covered by another element:

`<a href="#" title="">...</a>`

Fix this problem, or use {force: true} to disable error checking.

https://on.cypress.io/element-cannot-be-interacted-with

Schema Viewing Page -- accepts statements of entity schema data value type (failed).png (1,280×720 px, 177 KB)

I think that’s a different problem, this seems to be only due to the layout (different browser window size? not sure…)

Oh wait! This is just the exact same error that the Wikibase Suite people are seeing! (CC @lojo_wmde, @roti_WMDE)

With this commit adding cypress-terminal-report, we can see the errors:

cons:error ✘  RuntimeException: Failed to open /home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-termbox/resources.json
             Backtrace:
             from /home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/src/Termbox/TermboxModule.php(30)
             #0 /home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/src/Termbox/TermboxModule.php(15): Wikibase\View\Termbox\TermboxModule->readJsonFile()
             #1 /home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/includes/ResourceLoader/ResourceLoader.php(467): Wikibase\View\Termbox\TermboxModule->getMessages()
             #2 /home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/includes/ResourceLoader/StartUpModule.php(171): MediaWiki\ResourceLoader\ResourceLoader->preloadModu ...

And why is the termbox missing? Because cloning the submodules from Phabricator fails with HTTP 429 errors:

Cloning into 'Wikibase'...
+ cd Wikibase
+ git submodule update --init
Submodule 'lib/resources/wikibase-api' (https://gerrit.wikimedia.org/r/wikibase/javascript-api) registered for path 'lib/resources/wikibase-api'
Submodule 'view/lib/wikibase-data-model' (https://phabricator.wikimedia.org/source/wikibase-data-model.git) registered for path 'view/lib/wikibase-data-model'
Submodule 'view/lib/wikibase-data-values' (https://phabricator.wikimedia.org/source/datavalues-javascript.git) registered for path 'view/lib/wikibase-data-values'
Submodule 'view/lib/wikibase-data-values-value-view' (https://gerrit.wikimedia.org/r/data-values/value-view) registered for path 'view/lib/wikibase-data-values-value-view'
Submodule 'view/lib/wikibase-serialization' (https://phabricator.wikimedia.org/source/wikibase-serialization.git) registered for path 'view/lib/wikibase-serialization'
Submodule 'view/lib/wikibase-termbox' (https://gerrit.wikimedia.org/r/wikibase/termbox) registered for path 'view/lib/wikibase-termbox'
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/lib/resources/wikibase-api'...
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-model'...
error: RPC failed; HTTP 429 curl 22 The requested URL returned error: 429
fatal: the remote end hung up unexpectedly
fatal: clone of 'https://phabricator.wikimedia.org/source/wikibase-data-model.git' into submodule path '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-model' failed
Failed to clone 'view/lib/wikibase-data-model'. Retry scheduled
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-values'...
fatal: unable to access 'https://phabricator.wikimedia.org/source/datavalues-javascript.git/': The requested URL returned error: 429
fatal: clone of 'https://phabricator.wikimedia.org/source/datavalues-javascript.git' into submodule path '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-values' failed
Failed to clone 'view/lib/wikibase-data-values'. Retry scheduled
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-values-value-view'...
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-serialization'...
fatal: unable to access 'https://phabricator.wikimedia.org/source/wikibase-serialization.git/': The requested URL returned error: 429
fatal: clone of 'https://phabricator.wikimedia.org/source/wikibase-serialization.git' into submodule path '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-serialization' failed
Failed to clone 'view/lib/wikibase-serialization'. Retry scheduled
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-termbox'...
Cloning into '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-model'...
fatal: unable to access 'https://phabricator.wikimedia.org/source/wikibase-data-model.git/': The requested URL returned error: 429
fatal: clone of 'https://phabricator.wikimedia.org/source/wikibase-data-model.git' into submodule path '/home/runner/work/mediawiki-extensions-EntitySchema/mediawiki/extensions/Wikibase/view/lib/wikibase-data-model' failed
Failed to clone 'view/lib/wikibase-data-model' a second time, aborting

Apparently GitHub Actions are currently blocked from cloning from Phabricator.

I tried setting a custom user agent, in the hope that the 429 responses only affect a certain user agent, but it hasn’t helped (build job).

As for timing: build #300, 2024-08-06, still cloned the submodules successfully; build #301, 2024-08-07 is the first one where the submodules failed.

This timeline sounds familiar too. We had the first failure on 6th of August late evening already though.

https://github.com/wmde/wikibase-release-pipeline/actions/runs/10269776945/job/28429990630

Change #1063210 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/EntitySchema@master] Add cypress-terminal-report

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

Change #1063209 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/EntitySchema@master] Clone Wikibase submodules from GitHub

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

The above should work around the 429s from Phabricator, but IMHO this is a temporary workaround. I’ve asked about the responses and hope to hear back later; if the Phabricator responses persist, we could consider moving those submodules to Gerrit or GitLab.

Change #1063209 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Clone Wikibase submodules from GitHub

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

Change #1063210 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Add cypress-terminal-report

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

karapayneWMDE claimed this task.
karapayneWMDE subscribed.

Given that the follow up task exists, I'm going to mark this ticket as resolved.

T374926: [EPIC][Infra] Move Wikibase and WikibaseLexeme Git submodules to suitable Git host

Change #1327525 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/EntitySchema@master] Revert "Clone Wikibase submodules from GitHub"

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

Change #1327525 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Revert "Clone Wikibase submodules from GitHub"

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