Page MenuHomePhabricator

MinervaNeue legacy ruby browser tests need to be updated to work on buster/ruby2.5
Closed, InvalidPublic2 Estimated Story Points

Description

I triggered this against master, and got the following error:

current directory:
/workspace/src/skins/MinervaNeue/skins/MinervaNeue/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
/usr/bin/ruby2.5 -r ./siteconf20210422-290-yvozyg.rb extconf.rb
creating Makefile

current directory:
/workspace/src/skins/MinervaNeue/skins/MinervaNeue/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/workspace/src/skins/MinervaNeue/skins/MinervaNeue/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function);
did you mean ‘mFixnum’?
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~
                         mFixnum
generator.c:861:25: note: each undeclared identifier is reported only once for
each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function);
did you mean ‘mBignum’?
     } else if (klass == rb_cBignum) {
                         ^~~~~~~~~~
                         mBignum
make: *** [Makefile:243: generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/workspace/src/skins/MinervaNeue/skins/MinervaNeue/ruby/2.5.0/gems/json-1.8.3
for inspection.
Results logged to
/workspace/src/skins/MinervaNeue/skins/MinervaNeue/ruby/2.5.0/extensions/x86_64-linux/2.5.0/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  mediawiki_selenium was resolved to 1.7.3, which depends on
    json

Possibly we need to update mediawiki/selenium?

Event Timeline

Jdlrobson added subscribers: Edtadros, Jdlrobson.

We're looking to migrate these to Node.js.
According to @Edtadros we should be making some progress soon in that area.

I would recommend not investing too much time into this one. Perhaps it should be declined or merged into T174018 ?

This is a critical path to dropping stretch support from CI. The choice is move them or stop running them. If you decline them, we can just stop running them immediately, but I imagine that'll risk a lot of regressions. :-(

I think it's fine to stop running these in CI.
I've taken a look at the 7 tests and I think we can live without them for a short period of time.

@ovasileva can we commit to prioritizing T174018 in the next 2 months?

That is because the job Docker image moved from Stretch to Buster and thus it upgrades ruby from 2.3 to 2.5. In ruby 2.4 integer got changed hence why we get:

generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function);
did you mean ‘mFixnum’?
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~

The reason is mediawiki_selenium depends on json 1.8.3 which does not support ruby 2.4+. Would need to update the json lib to 2.0.0 which has:

Implements compatibility to ruby 2.4 integer unification.

It might be possible to achieve this via the repository Gemfile (ie without having to cut a new version of mediawiki_selenium).

A note is that running Selenium with ruby has been legacy for quite a while. We had a task filed in 2016 to migrate them to webdriver.io ( T139740 ). For MinervaNeue the specific task is T174018 . Maybe it is reasonably easy to port them to wdio? Else we should consider just removing the ruby based selenium tests / stop running them entirely.

ovasileva triaged this task as Medium priority.Apr 27 2021, 9:17 AM
ovasileva edited projects, added Web-Team-Backlog; removed Web-Team-Backlog (Tracking).

Team should discuss (and maybe estimate) what our plan is here. Do we want to commit to rewriting these tests?

Change 685627 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] [DNM] Zuul: [mediawiki/skins/MinervaNeue] Drop Ruby-based selenium job

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

@Jdforrester-WMF: Could you give an indication of the priority of this for RelEng?

☝️ I ask because we could merge your patch above to unblock any high-priority work and then Product - Web could migrate the tests at their leisure.

@Jdforrester-WMF: Could you give an indication of the priority of this for RelEng?

This is not an urgent request from our perspective, but it's as important as the signal the tests provide.

Change 685627 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/skins/MinervaNeue] Drop Ruby-based selenium job

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

Mentioned in SAL (#wikimedia-releng) [2021-05-14T02:16:53Z] <James_F> Zuul: [mediawiki/skins/MinervaNeue] Drop Ruby-based selenium job T174018 T177260 T280901