Page MenuHomePhabricator

LoadError when running selenium-WikibaseLexeme-chrome Jenkins job
Closed, ResolvedPublic

Description

selenium-WikibaseLexeme-chrome fails:

00:00:04.270 + bundle exec rake selenium
00:00:04.987 /usr/bin/ruby2.1 -S bundle exec cucumber tests/browser --backtrace --verbose --color --format pretty --format Cucumber::Formatter::Sauce --out '/srv/jenkins-workspace/workspace/selenium-WikibaseLexeme-chrome/BROWSER/chrome/MEDIAWIKI_ENVIRONMENT/beta/PLATFORM/Linux/label/DebianJessie && contintLabsSlave/log/junit' --tags ~@skip --tags @wikidata.beta.wmflabs.org --tags @chrome
00:00:06.973 no such file to load -- /srv/jenkins-workspace/workspace/selenium-WikibaseLexeme-chrome/BROWSER/chrome/MEDIAWIKI_ENVIRONMENT/beta/PLATFORM/Linux/label/DebianJessie && contintLabsSlave/tests/browser/features/support/../../../../../Wikibase/tests/browser/features/support/modules (LoadError)

WikibaseLexeme/tests/browser/features/support/env.rb:20-25

require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/modules'
require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/step_definitions'
require_all File.dirname(__FILE__) + '/pages'
require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/utils'
require File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/pages/item_page'
require File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/pages/property_page'

It's a code smell if a repository just assumes another repository would be available at a precise location. If some code is shared between Wikibase and WikibaseLexeme it belongs to a library, probably mediawiki_selenium Ruby gem. If you think it's Wikibase specific maybe a new gem, mediawiki_selenium-wikibase?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 21 2018, 3:19 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJun 21 2018, 3:21 PM
zeljkofilipin updated the task description. (Show Details)

no such file to load -- /srv/jenkins-workspace/workspace/selenium-WikibaseLexeme-chrome/BROWSER/chrome/MEDIAWIKI_ENVIRONMENT/beta/PLATFORM/Linux/label/DebianJessie && contintLabsSlave/tests/browser/features/support/../../../../../Wikibase/tests/browser/features/support/modules (LoadError)

I am quite sure that this error is caused by the fact that Wikibase git repo is not checkout out in selenium-WikibaseLexeme-chrome.
Hacking the setup somehow so it not only clones WikibaseLexeme.git, but also Wikibase.git should make the job run, although I failed to do it yet.

@WMDE-leszek I think I know how to do it, but I don't think it's needed to run tests targeting beta cluster. I'll try a few things, maybe the job needs to be refactored.

@zeljkofilipin: looking forward to see what you come up with!

The reason why I think Wikibase code is needed is that WikibaseLexeme/tests/browser/features/support/env.rb contains following stuff:

require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/modules'
require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/step_definitions'
require_all File.dirname(__FILE__) + '/pages'
require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/utils'
require File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/pages/item_page'
require File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/pages/property_page'

/pages is "local" but the other stuff is not going to be find, and ruby test code will be missing some relevant bits without the rest.

The reason why I think Wikibase code is needed is that WikibaseLexeme/tests/browser/features/support/env.rb contains following stuff:

require_all File.dirname(__FILE__) + '/../../../../../Wikibase/tests/browser/features/support/modules'

/me facepalms 🤦‍♂️

Of course. I should have noticed that.

Anyway, it's a code smell if a repository just assumes another repository would be available at a precise location. If some code is shared between Wikibase and WikibaseLexeme it belongs to a library, probably mediawiki_selenium Ruby gem. If you think it's Wikibase specific maybe a new gem, mediawiki_selenium-wikibase?

zeljkofilipin updated the task description. (Show Details)

Yup, something like this would rather be needed here. Will have a look after the weekend.

Vvjjkkii renamed this task from LoadError when running selenium-WikibaseLexeme-chrome Jenkins job to siaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from siaaaaaaaa to LoadError when running selenium-WikibaseLexeme-chrome Jenkins job.Jul 2 2018, 11:23 AM
CommunityTechBot lowered the priority of this task from High to Normal.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
hashar closed this task as Resolved.Jun 19 2019, 9:21 AM
hashar added a subscriber: hashar.

The ruby/mediawiki selenium job has been removed in favor of a NodeJS one: https://integration.wikimedia.org/ci/job/selenium-daily-beta-WikibaseLexeme/