Page MenuHomePhabricator

NameError: uninitialized constant MediawikiSelenium::RakeTask::Shellwords
Closed, ResolvedPublic

Description

My local mediawiki-vagrant install with patch 313221

mediawiki/vagrant/mediawiki/extensions/Echo$ bundle exec rake spec
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
rake aborted!
NameError: uninitialized constant MediawikiSelenium::RakeTask::Shellwords
/usr/local/lib/ruby/gems/2.3.0/gems/mediawiki_selenium-1.7.3/lib/mediawiki_selenium/rake_task.rb:15:in `initialize'
/Users/z/Documents/gerrit/mediawiki/vagrant/mediawiki/extensions/Echo/Rakefile:12:in `new'
/Users/z/Documents/gerrit/mediawiki/vagrant/mediawiki/extensions/Echo/Rakefile:12:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:332:in `exec'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:34:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:26:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)

Also reproducible in Jenkins (rake-jessie/57064):

...
00:00:17.065 + bundle exec rake test
00:00:17.626 [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
00:00:17.666 rake aborted!
00:00:17.666 NameError: uninitialized constant MediawikiSelenium::RakeTask::Shellwords
00:00:17.666 /home/jenkins/workspace/vendor/bundle/gems/mediawiki_selenium-1.7.3/lib/mediawiki_selenium/rake_task.rb:15:in `initialize'
00:00:17.666 /home/jenkins/workspace/rake-jessie/Rakefile:12:in `new'
00:00:17.666 /home/jenkins/workspace/rake-jessie/Rakefile:12:in `<top (required)>'
00:00:17.667 /home/jenkins/workspace/vendor/bundle/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
00:00:17.667 (See full trace by running task with --trace)
00:00:17.681 Build step 'Execute shell' marked build as failure
00:00:18.235 [PostBuildScript] - Execution post build scripts.
00:00:18.235 [PostBuildScript] Build is not success : do not execute script
00:00:18.333 Finished: FAILURE

Event Timeline

Change 327211 had a related patch set uploaded (by Zfilipin):
Fix NameError: uninitialized constant MediawikiSelenium::RakeTask::Shellwords

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

Can reproduce locally on my machine with the Echo patchset https://gerrit.wikimedia.org/r/#/c/313221/21 rECHO599789f7ff26

The issue is the rake update. Moving back to 11.1.1 bundle exec rake spec works just fine (i.e. it has shellwords).

-    rake (11.3.0)
+    rake (11.1.1)

From 1/1 with Zeljko:

Commit is https://github.com/ruby/rake/pull/131/commits/81eb4b98d60d0400fa9336fc7184e8725c927f94

$ git tag --contains 81eb4b98d60d0400fa9336fc7184e8725c927f94
v11.2.0
v11.2.1
v11.2.2
v11.3.0
v12.0.0
v12.0.0.beta1

So shellWords is no more available since Rake 11.2.0

Change 327211 merged by jenkins-bot:
Fix NameError: uninitialized constant MediawikiSelenium::RakeTask::Shellwords

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