Page MenuHomePhabricator

Migrate mediawiki/vagrant CI to Bullseye and remove custom image
Closed, ResolvedPublic

Description

MediaWiki Vagrant stopped being supported by the foundation several years ago (2017). We have carried support for it in CI over time, but as we are going to upgrade Zuul I'd like to stop supporting it. There are several reasons:

  • It is one of the very few projects using ruby (translatewiki, oojs/ui, no more used mediawiki/ruby/api are the others)
  • It uses an image based on Debian Buster
  • We are upgrading CI/Zuul and that is one less thing to migrate

Event Timeline

Change #1165954 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] Remove mediawiki/vagrant and ruby2.5 support

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

I know @Tgr still uses Vagrant. This task is to remove it from Zuul/Jenkins and remove the associated Docker image so that is one less thing to support (similar to how jsduck will be dropped).

Vagrant actually uses ruby 2.7, which it seems integration/config is still supporting.

It's also on bullseye, not buster like the CI Vagrant image. I suppose that doesn't matter much.

Why does it even need a separate docker image, rather than just using the standard ruby pipeline? Is it because of the docs? I don't think there's much value to them.

The CI image is based upon Debian Buster with Ruby 2.5.

Vagrant depends on nokogiri which requires zlib1g-dev for compilation. There is also rsync needed by the test suite (I believe). Given my main interest is to reduce the number of images (T398469), I will add rsync/zlib1g-dev in the ruby-rake-2.7 image and I guess that will solve it.

hashar renamed this task from Remove mediawiki/vagrant from CI to Migrate mediawiki/vagrant CI to Bullseye and remove custom image.Jul 4 2025, 4:44 PM

Change #1166424 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: rake-ruby2.7: add Vagrant dependencies to rake-ruby2.7

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

Change #1166425 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] Zuul, jjb: migrate vagrant to Bullseye & Ruby 2.7

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

Change #1166426 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: remove ruby2.5 images: unused

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

Change #1166424 merged by jenkins-bot:

[integration/config@master] dockerfiles: rake-ruby2.7: add Vagrant dependencies to rake-ruby2.7

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

Change #1166425 merged by jenkins-bot:

[integration/config@master] Zuul, jjb: migrate vagrant to Bullseye & Ruby 2.7

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

Change #1166416 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/vagrant@master] Remove BUNDLED WITH 1.17.3 limitation

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

I eventually switched CI from Buster ruby 2.5 to Bullseye and ruby 2.7.

I have sent https://gerrit.wikimedia.org/r/c/mediawiki/vagrant/+/1166416 to remove BUNDLED WITH 1.17.3 and CI fails with:

Bundled gems are installed into `/cache/bundle`
+ exec bundle exec rake test
`/nonexistent` is not a directory.
Bundler will use `/tmp/bundler-20250704-8-15d1zu' as your home directory temporarily.
*** THIS RUBY IMPLEMENTATION DOESN'T REPORT FILE AND LINE FOR PROCS ***
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util.rb:461: warning: URI.escape is obsolete
rake aborted!
LoadError: cannot load such file -- sync
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util/storage.rb:2:in `require'
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util/storage.rb:2:in `<top (required)>'
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet.rb:307:in `require'
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet.rb:307:in `<top (required)>'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax/templates.rb:2:in `require'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax/templates.rb:2:in `<top (required)>'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax.rb:3:in `require'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax.rb:3:in `<top (required)>'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax/tasks/puppet-syntax.rb:1:in `require'
/cache/bundle/ruby/2.7.0/gems/puppet-syntax-2.6.0/lib/puppet-syntax/tasks/puppet-syntax.rb:1:in `<top (required)>'
/src/Rakefile:14:in `require'
/src/Rakefile:14:in `<top (required)>'
/cache/bundle/ruby/2.7.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
Build step 'Execute shell' marked build as failure

The failure is:

LoadError: cannot load such file -- sync
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util/storage.rb:2:in `require'

Ruby 2.7.0 was released back in 2019 https://www.ruby-lang.org/en/news/2019/12/25/ruby-2-7-0-released/

It no more bundles Synchronizer (sync gem).

Change #1166416 abandoned by Hashar:

[mediawiki/vagrant@master] Updates for Bundle 2.2.5 and Ruby 2.7

Reason:

Eventually that fails further due to:

1) Vagrant being pinned to 1.9.1 which pins Nokogiri 1.6.7.1

2) Nokogiri not compiling under Debian Bullseye due to https://github.com/sparklemotion/nokogiri/issues/2105


Interestingly I have already found out about that issue **back in 2018**!!! T185008#3996573

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

MediaWiki Vagrant uses Vagrant 1.9.1 which pins Nokogiri 1.6.7.1. Due to https://github.com/sparklemotion/nokogiri/issues/2105 , it does not compile under Debian Bullseye.

When sending https://github.com/sparklemotion/nokogiri/issues/2105 , the Puppet syntax check fails, presumably because Puppet 5 does not support Ruby 2.7, I know we had that issue in production and went with John Bond to add some monkey patches:

/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util.rb:461: warning: URI.escape is obsolete
---> syntax:manifests
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/cache/bundle/ruby/2.7.0/gems/puppet-5.5.22/lib/puppet/util.rb:461: warning: URI.escape is obsolete

Thus mediawiki/vagrant is unsurprisingly broken with Ruby 2.7:

  • Vagrant 1.9.1 was released in December 2016.
  • Puppet 5.5 in March 2018 and is known to have issue with Ruby 2.7

Essentially the stack is obsolete and has not been maintained since ~ 2017.


I have removed:

  • the ruby 2.5 image which is based on Buster and has to be removed T335765
  • the more specific image by adding rsync and zlib1g-dev packages to the generic ruby image T397429

Which were the two reasons for me to investigate Vagrant..

@Tgr I am leaving the Ruby 2.7 CI job as is, we can make it non voting which will prevent it from voting Verified -1, or simply remove the job and drop mediawiki/vagrant from the CI config.

Change #1166426 merged by jenkins-bot:

[integration/config@master] dockerfiles: remove ruby2.5 images: unused

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

Change #1165954 abandoned by Hashar:

[integration/config@master] Migrate mediawiki/vagrant to Bullseye & Ruby 2.7

Reason:

I ended up splitting this one in smaller changes.

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

I don't think MW-Vagrant meaningfully pins a Vagrant version, it's up to the host machine. I have Vagrant 2.4.3 (which is about six months old) and haven't encountered any problems related to the Vagrant version. Not sure what's the relationship between the vagrant gem version and the actual Vagrant version, but we can probably just bump it. (The last FLOSS licenced version is 2.3.7 so it would make sense to standardize on that.)

Anyway I don't have time for it ATM so let's make the job non-voting for now.

Change #1175591 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[integration/config@master] Make MW-Vagrant tests non-voting

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

Change #1175591 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/vagrant] Make ruby tests non-voting for now

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

Mentioned in SAL (#wikimedia-releng) [2025-08-05T08:46:58Z] <James_F> Zuul: [mediawiki/vagrant] Make ruby tests non-voting for now, for T398469