Page MenuHomePhabricator

Jenkins complains on MobileFrontend commits with Could not read gem at /var/lib/gems/2.1.0/cache/rake-10.5.0.gem. It may be corrupted.
Closed, ResolvedPublic

Description

Currently all MobileFrontend patches are getting -1s from Jenkins
For example:
https://gerrit.wikimedia.org/r/#/c/305082/6
https://integration.wikimedia.org/ci/job/npm-node-4/1090/console

Jenkins complains with a Ruby related error:

17:10:22 > @ predoc /mnt/jenkins-workspace/workspace/npm-node-4
17:10:22 > bundle install
17:10:22 
17:10:26 Fetching gem metadata from https://rubygems.org/.........
17:10:27 Fetching additional metadata from https://rubygems.org/..
17:10:30 
17:10:30 We trust you have received the usual lecture from the local System
17:10:30 Administrator. It usually boils down to these three things:
17:10:30 
17:10:30     #1) Respect the privacy of others.
17:10:30     #2) Think before you type.
17:10:30     #3) With great power comes great responsibility.
17:10:30 
17:10:30 sudo: no tty present and no askpass program specified
17:10:31 
17:10:31 We trust you have received the usual lecture from the local System
17:10:31 Administrator. It usually boils down to these three things:
17:10:31 
17:10:31     #1) Respect the privacy of others.
17:10:31     #2) Think before you type.
17:10:31     #3) With great power comes great responsibility.
17:10:31 
17:10:31 sudo: no tty present and no askpass program specified
17:10:31 
17:10:31 Bundler::GemspecError: Could not read gem at /var/lib/gems/2.1.0/cache/rake-10.5.0.gem. It may be corrupted.
17:10:31 An error occurred while installing rake (10.5.0), and Bundler cannot continue.
17:10:31 Make sure that `gem install rake -v '10.5.0'` succeeds before bundling.

Event Timeline

Change 306048 had a related patch set uploaded (by Jdlrobson):
Update Gemfile

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

My above patch doesn't seem to help.
This appears to be related to our npm job which invokes bundle install to generate documentation. Did someone touch this recently?

Looks like bundler is looking for package in cache. We could update the Gemfile with a different version of rake. I'm not sure if that will work though.

Huh, this is probably my fault. But why is MF doing ruby stuff inside of npm?

@Legoktm was just about to ping you about T142892 :)
I completely agree about using node for this purpose :) We're looking into alternatives but haven't landed on one yet - T138401 - any thoughts you have around that would be much appreciated.

Change 306079 had a related patch set uploaded (by Legoktm):
build: Pass --path vendor/bundle to bundle install

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

Change 306079 merged by jenkins-bot:
build: Pass --path vendor/bundle to bundle install

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

Thanks @Legoktm.

@Jdlrobson: We could move the building of our docs into the Ruby-specific rake-jessie job that runs on every change. That wouldn't be blocked on replacing jsduck.

@Jdlrobson: We could move the building of our docs into the Ruby-specific rake-jessie job that runs on every change. That wouldn't be blocked on replacing jsduck.

Yeah, I was thinking more along those lines. For example, if you look at oojs-ui's package.json, they have "npm run-script doc" for building docs, which calls jsduck, but the installation of jsduck has to be done separately because doing that part with npm is icky.

Change 307986 had a related patch set uploaded (by Phuedx):
build: Pass --path vendor/bundle to bundle install

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

Change 307986 merged by jenkins-bot:
build: Pass --path vendor/bundle to bundle install

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