Page MenuHomePhabricator

Investigate how to update dependencies of Wikidata Query Service UI app (in the way does not break the app)
Closed, ResolvedPublic

Description

As reported in T375058, updating npm dependencies of the WDQS UI app breaks some behaviour of the app related to displaying query results as a chart. The issue seem to only occur when using the app version generated by the gui-deploy script, see comment: T375058#10156441

In the scope of T375058 the dependency update has been reverted (at least partially) to the state where the charts are displayed correctly.

It seems likely that moving WDQS UI app build process to modern tooling (T288466), this investigation is about checking if the issue could be resolved with minor adjustment to the current build process. If the time dedicated to the investigation is spent without a "workaround" found, we'll assume changing the build process is the right path forward.

Note:

  • As T375058 has been reported 2 months ago, start checking with the most up-to-date versions of dependencies that might be available at the current point in time. (e.g. by running npm update)

Acceptance criteria:

  • dependencies have been updated to versions previously attempted to https://gerrit.wikimedia.org/r/c/wikidata/query/gui/+/1071231 or newer if existing (e.g. by running npm update and it not installing any new updates)
  • After "building" the app, the known functionality of the application works as expected - likely validated manually as there seem to not be any end-to-end test infrastructure in place for this app

Investigation timebox: 20 hours for two people.

Event Timeline

WMDE-leszek renamed this task from Update dependencies of Wikidata Query Service UI app (in the way does not break the app) to Investigate how to update dependencies of Wikidata Query Service UI app (in the way does not break the app).Nov 7 2024, 11:25 AM
WMDE-leszek updated the task description. (Show Details)

Change #1091596 had a related patch set uploaded (by Dima koushha; author: Dima koushha):

[wikidata/query/gui@master] Apply routine updates and fix build minification issue

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

Reporting that the issue reported in T375058 occurs when updating the sub-dependency uglify-js package to a version higher than 3.18.0. The problem arises during the minification of files in the build process by grunt-contrib-uglify, leading to the improper rendering of query results as charts, including area, line, bar, and scatterChart in the WDQS UI app.

we prepared a patch to address this issue:

  • The uglify-js sub-dependency has been pinned to version ~3.17.0 to ensure stability and correct functionality.
  • Dependencies were updated to the latest versions (where possible) without causing the issue in the build process.

Change #1091596 merged by jenkins-bot:

[wikidata/query/gui@master] Apply routine updates and fix build minification issue

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

Change #1091613 had a related patch set uploaded (by Dima koushha; author: WDQSGuiBuilder):

[wikidata/query/gui-deploy@production] Merging from 3cfc2ceb9de0f9346698b309bf35376c4c1b7ca8

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

Change #1091613 merged by Jakob:

[wikidata/query/gui-deploy@production] Merging from 3cfc2ceb9de0f9346698b309bf35376c4c1b7ca8

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