Page MenuHomePhabricator

WMCH Cassandra: make it alive again
Closed, ResolvedPublic24 Estimated Story PointsBUG REPORT

Description

The WMCH contributor named Lauren has compiled an interesting list of bugs that can be addressed.

To facilitate triage, we bring them into Wikimedia Phabricator 🌈

The list has the date Monday, August 5th, 2024. - Thanks Lauren:

In the following part of the document there is the original analysis from the technical contributor Lauren, activated by Sandra Becker.

Analysis + Additional Questions

  1. Is there any additional internal documentation regarding the tool or its dependencies that could aid in fixing the issues?
    1. → Answer by bozz: probably no 🌈 we just have the README - https://gitlab.wikimedia.org/repos/wikimedia-ch/cassandra-GLAM-tools/-/blob/main/README.md?ref_type=heads ; also Ilario V. has a documentation but it's just really that readme.
  2. Is it possible to receive administrative access to the administrator panel of Cassandra to attempt to fix bugs?
    1. → Let's continue in T374303: WMCH Cassandra: recover admin access
  3. Most of the issues surrounding the dashboard (as seen in https://stats.wikimedia.swiss/BUL/dashboard) appear to originate from the dashboard tool itself (Metabase)
  4. Do configuration files or an administrator panel exist for managing the Metabase component of the tool?
    1. → Probably we will discover this after T374303: WMCH Cassandra: recover admin access
  5. Dependencies appear to be causing the issues
  6. Broken images cannot be fixed manually due to the manner in which the tool generates the content → Either the function querying for the image or the image itself is causing some images to be broken on the tool
  7. Object data is being logged into the browser console – is this behavior desired? – The behavior originates from one of Cassandra’s dependencies, “Toolforge.”
    1. → Uhm this seems something like this: T313737: Fix argo.wikimedia.swiss database connection logic (cannot generate any report for dewiki - works for itwiki and few more wikis)

Regarding the Bugs

1. Broken image file for the “Swisstopo Historic” entry on the homepage

Temporary fix:
The image source in the HTML code was replaced with the following:
https://upload.wikimedia.org/wikipedia/commons/f/f4/Swisstopo-Dokumentensammlung-Visualisierung_H%C3%B6henmodell_Rimini.jpg
Additional Note:
Due to the dynamic nature of the tool, manual fixes will not resolve this issue. Either
the querying function must be examined, or the image file itself.

2. Favicon not loading

The fix:
The “favicon.ico” file was moved into the tool’s /assets/ sub-directory
The following line of code was inserted into line 19 of “index.html”:
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon">
Additional note:
This fix has to be manually implemented across all other pages for the tool “About this Project” flavor text:
Temporary fix:
Manually removing the “custom-intro” <p> element from the HTML file deleted the text successfully.
Additional note:
Similar to the 1st bug, this manual removal does not resolve the issue, due to the dynamic nature of the tool.

4. Additional links found in comments of “index.html:”

Note: The additional links found in the comments of “index.html” can be removed. They
reveal additional paths to other unused pages such as “/introduction,” “/contacts,” as well as
the administrator panel under “/admin/panel.”

5. “Failed to decode downloaded font: <URL>” (x260 errors) at https://stats.wikimedia.swiss/BUL/dashboard

Note: The fonts appear to be corrupted. Downloading and attempting to open the .ttf font files lead to an additional error: “The requested file is not a valid font file.”
Further testing using the FOSS font editor “FontForge” also indicates that the font files are corrupted. When attempting to open the font using FontForge, the following error was encountered: “<file name> is not a known format (or uses features of that format fontforge
does not support, or is so badly corrupted as to be unreadable).”
The corrupted font files are located under:

dashboard-metabase
  stats.wikimedia.swiss
    metabase
      app/dist

6. OTS parsing error: size of decompressed WOFF 2.0 is less than compressed size

Note: This error is related to the above issue regarding the corrupted font files

7. OTS parsing error: GPOS: misaligned table

Note: This bug is related to the corrupted font files from bug 5.

8. Error with Permissions-Policy header: Origin trial controlled feature not enabled: <feature>"

Note: The web page is attempting to use an origin trial feature that has not been enabled for the domain (also known as the “origin”) of the web page due to the required origin trial token being missing or incorrect.
Potential causes:

  1. Missing origin trial token → token not included in HTML or HTTP headers
  2. Expired or incorrect token values
  3. Unsupported feature → the browser does not support the feature or the origin

trial has ended
Solutions:

  1. If the feature is essential → a valid origin trial token must be obtained and

included in the HTML/HTTP headers of the web page or

  1. If the feature is not essential → the feature may be removed

9. "Error with Permissions-Policy header: Unrecognized feature: <feature>"

Solutions:

  1. If the feature is essential → ensure compatibility/availability for browsers,

check for typos

  1. If the feature is not essential → the feature may be removed

10. webpack:// domain source of multiple errors → “settings.js” file

Note: example errors caused by “settings.js” file of the webpack:// dependency:

Error getting setting scalar.field – settings.js:157
Error getting setting graph.x_axis._is_timeseries – settings.js:157
Error getting setting graph.y_axis.title_text – settings.js:157

Related Objects

Event Timeline

I can answer some questions probably

ValerioBoz-WMCH updated the task description. (Show Details)
ValerioBoz-WMCH changed the subtype of this task from "Task" to "Bug Report".
ValerioBoz-WMCH renamed this task from WMCH Cassandra: track new bugs into Wikimedia Phabricator - thanks to contributions from Lauren to WMCH Cassandra: make it alive again.Oct 4 2024, 3:39 PM
ValerioBoz-WMCH updated the task description. (Show Details)
ValerioBoz-WMCH set the point value for this task to 24.

The root problem was resolved by creating a dedicated Toolforge user and adopting that for the SSH tunnel that allows to do direct queries against the Wikimedia Replicas through a local SSH tunnel. That tunnel was also refreshed a bit with the new Toolforge bastion fingerprint and friends.

https://meta.wikimedia.org/wiki/User:WMCH-Cassandra

Interesting well-known Wikimedia technical limitation that affects the workflows of WMCH Cassandra:

T318191: Evaluate opening the readonly Wiki Replicas to the WAN (since we already have user authentication)

See that the views are now updated up to 2024 (!)

https://stats.wikimedia.swiss/ZU/page-views

All GLAMs:

https://stats.wikimedia.swiss/

To test something, click on a Glam and see "Views". That was stuck but now slowly recovering \o/