Page MenuHomePhabricator

Install svgo
Closed, DeclinedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
run svgo on (a) https://svgworkaroundbot.toolforge.org/ and for (b) https://commons.wikimedia.org/wiki/User:SVGWorkaroundBot

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
making workarounds for librsvg-bugs

According to https://wikitech.wikimedia.org/wiki/Help:Troubleshooting_Toolforge#Tool_requires_a_package_that_is_not_currently_installed_in_Toolforge I think a local installation would be enough.

Benefits (why should this be implemented?):
see https://commons.wikimedia.org/wiki/Commons:Bots/Requests/SVGWorkaroundBot

e.g https://de.wikipedia.org/wiki/Wikipedia:Grafikwerkstatt#ROC,_SVG_Fehler_laut_Commons

Event Timeline

taavi subscribed.

Newer node.js versions (up to 12 I think) are already available on Kubernetes. The grid will be upgraded via T277653: Toolforge: add Debian Buster to the grid and eliminate Debian Stretch, the current timelines for that say that a Buster grid (with node 10) will be available during this calendar year.

Where are you trying to run this that doesn't have nodejs >= 8.11 ? The grid has 8.11.1, and node 8, 10, and 12 are available on kubernetes.

except that the grid already seems to have node 8 from stretch-backports:

taavi@tools-sgeexec-0912:~ $ node --version
v8.11.1

where are you seeing outdated versions?

$ ssh -X jkalliau@login.tools.wmflabs.org
X11 forwarding request failed on channel 0
Linux tools-sgebastion-07 4.19.0-0.bpo.14-amd64 #1 SMP Debian 4.19.171-2~deb9u1 (2021-02-08) x86_64
Debian GNU/Linux 9.13 (stretch)
tools-sgebastion-07 is a Toolforge bastion (role::wmcs::toolforge::bastion)
======================================================================
_______  _____   _____         _______  _____   ______  ______ _______
   |    |     | |     | |      |______ |     | |_____/ |  ____ |______
   |    |_____| |_____| |_____ |       |_____| |    \_ |_____| |______
======================================================================
This is a server of the tools Cloud VPS project, the home of community
managed bots, webservices, and tools supporting the Wikimedia movement.

Use of this system is subject to the Toolforge Terms of Use,
Code of Conduct, and Privacy Policies:
- https://wikitech.wikimedia.org/wiki/Help:Toolforge/Terms_and_conditions

General guidance and help can be found at:
- https://toolforge.org/

The last Puppet run was at Mon Nov 15 14:22:50 UTC 2021 (28 minutes ago). 
Last puppet commit: (4e25a7dc8a) Kormat - mariadb: Set important db host monitoring to critical.
Last login: Mon Nov 15 14:47:32 2021 from dhcp18.imws.tuwien.ac.at
$ npm --version
5.8.0
JoKalliauer renamed this task from Update Node.js to 8.x.x to Update npm to 8.x.x.Nov 15 2021, 3:29 PM
JoKalliauer renamed this task from Update npm to 8.x.x to Update npm to 7.x.x.Nov 15 2021, 3:34 PM

node12 k8s containers have npm 7.5.2 and node10 containers have npm 6.14.5.

@AntiCompositeNumber Thank you very much.

First of all I do not know anything about Node.js/npm and I'm not really capable to get svgo working on toolforge. (I know that's my personal problem and not an WMF-issue, however I do not know where to get help.)

If I use webservice --backend=kubernetes start https://svgworkaroundbot.toolforge.org/ is working (except if you enable svgo, you will get an empty file)

However if I use webservice --backend=kubernetes node12 start as written on https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Container_images I get
Could not find ~/www/js/package.json. Are you sure you have a proper nodejs application in ~/www/js?

I tried git clone https://github.com/svg/svgo.git, and got Starting webservice............... however https://svgworkaroundbot.toolforge.org/ is responding 503 Service Temporarily Unavailable.

JoKalliauer renamed this task from Update npm to 7.x.x to Install svgo.Nov 15 2021, 4:30 PM
JoKalliauer updated the task description. (Show Details)

If I use webservice --backend=kubernetes start https://svgworkaroundbot.toolforge.org/ is working (except if you enable svgo, you will get an empty file)

Currently the default web service type is PHP 7.3. It serves PHP files from $HOME/public_html. I'm not sure how you set it up, but I don't except a Node.js application work on a PHP runtime.

However if I use webservice --backend=kubernetes node12 start as written on https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Container_images I get
Could not find ~/www/js/package.json. Are you sure you have a proper nodejs application in ~/www/js?

I tried git clone https://github.com/svg/svgo.git, and got Starting webservice............... however https://svgworkaroundbot.toolforge.org/ is responding 503 Service Temporarily Unavailable.

Looking at its github description, svgo seems to be a command line tool and not a web service. webservice doesn't seem to check for this, so it will show the "starting" text but the actual web service will fail to start as there is no "start" script defined in its package.json file.

@Majavah Thanks for clarifying!

I'm not sure how you set it up, but I don't except a Node.js application work on a PHP runtime.

I run a bash-file calling svgo, see https://github.com/JoKalliauer/convert. It is a fork of https://github.com/toollabs/convert by @Rillke .

According to https://wikitech.wikimedia.org/wiki/Help:Troubleshooting_Toolforge#Tool_requires_a_package_that_is_not_currently_installed_in_Toolforge I completely changed the task to my actual intention, to install the command-line-tool svgo.

I'm closing all grid engine install/update tasks as the [[ grid engine is being removed | https://wikitech.wikimedia.org/wiki/News/Toolforge_Grid_Engine_deprecation ]]. Please see the instructions page on how to migrate your tool to Kubernetes. Thanks.