01:23:04 Scenario: | press the ESC key in the new alias input field | # features/aliases.feature:39 01:23:28 negative argument (ArgumentError) 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.4/lib/active_support/core_ext/string/indent.rb:8:in `*' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.4/lib/active_support/core_ext/string/indent.rb:8:in `indent!' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.4/lib/active_support/core_ext/string/indent.rb:41:in `block in indent' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.4/lib/active_support/core_ext/string/indent.rb:41:in `tap' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.4/lib/active_support/core_ext/string/indent.rb:41:in `indent' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/formatter/console.rb:35:in `format_step' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/formatter/pretty.rb:155:in `step_name' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:181:in `block in send_to_all' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:179:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:179:in `send_to_all' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:173:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:119:in `visit_step_name' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:112:in `block in visit_step_result' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:111:in `visit_step_result' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/step_invocation.rb:43:in `visit_step_result' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/step_invocation.rb:39:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:106:in `block in visit_step' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:105:in `visit_step' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:138:in `block (2 levels) in accept_expand' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/step_collection.rb:49:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/step_collection.rb:49:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:137:in `block in accept_expand' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:83:in `block (2 levels) in with_hooks' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:99:in `before_and_after' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:82:in `block in with_hooks' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:120:in `call' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:120:in `block (3 levels) in around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:9:in `block in around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:97:in `call' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:97:in `execute_around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/language_support/language_methods.rb:8:in `around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:119:in `block (2 levels) in around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:123:in `call' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime/support_code.rb:123:in `around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:94:in `around' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:81:in `with_hooks' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:135:in `accept_expand' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:107:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:25:in `block in accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:23:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:23:in `each_with_index' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/outline_table.rb:23:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:90:in `block in visit_outline_table' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:89:in `visit_outline_table' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/examples.rb:25:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:80:in `block in visit_examples' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:79:in `visit_examples' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario_outline.rb:19:in `block in accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario_outline.rb:18:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario_outline.rb:18:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:74:in `block in visit_examples_array' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:73:in `visit_examples_array' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/scenario_outline.rb:45:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:58:in `block in visit_feature_element' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:57:in `visit_feature_element' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:38:in `block in accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:27:in `block in visit_feature' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:26:in `visit_feature' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:28:in `block in accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:27:in `accept' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:21:in `block in visit_features' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:20:in `visit_features' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:49:in `run!' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/cli/main.rb:47:in `execute!' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/bin/cucumber:13:in `<top (required)>' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/bin/cucumber:23:in `load' 01:23:28 /mnt/home/jenkins-deploy/.gem/2.0.0/bin/cucumber:23:in `<main>'
Description
Details
Event Timeline
This problem is introduced by T106839: move browsertests-Wikidata-WikidataTests-linux-chrome-sauce to jjb.
Since JJB and Jenkins generated configurations are different, if you want to compare the current JJB version you can configure the job, save it and Jenkins will renormalize it to its internal format. That then let you a diff between two Jenkins normalized versions.
Maybe you can regenerate the job entirely and see what happens? Make sure your JJB is the current version from integration/jenkins-job-builder.
There is an earlier error message in the log: no implicit conversion of String into Integer (TypeError)
I reverted to the old config, triggered a run and reverted to the jjb generated one again: https://integration.wikimedia.org/ci/job/browsertests-Wikidata-WikidataTests-linux-chrome-sauce/133/console
So it seems "no implicit conversion of String into Integer (TypeError)" also happens with the old config. But "negative argument (ArgumentError)" doesn't happen in the old config only in the new one.
Created T111069: [Bug] fix no implicit conversion of String into Integer (TypeError) in browsertests for the other bug.
I have created a new job (using jenkins web interface), browsertests-Wikidata-SmokeTests-linux-firefox-sauce-T110510, copied from browsertests-Wikidata-SmokeTests-linux-firefox-sauce, but running only one scenario. The new job reproduces the problem.
I have created a new job (using JJB) browsertests-Wikidata-T110510-linux-firefox-sauce, using browsertests-Wikidata-SmokeTests-linux-firefox-sauce as a template. The new job reproduces the problem.
Strange, the error message says the problem is in Cucumber's default (pretty) formatter.
00:00:04.450 ... bundle exec cucumber features/label.feature:49 ... 00:00:19.206 Scenario: | press the RETURN key in the label input field | # features/label.feature:49 00:00:32.295 negative argument (ArgumentError) 00:00:32.296 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/activesupport-4.2.3/lib/active_support/core_ext/string/indent.rb:8:in `*' ... 00:00:32.297 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/formatter/console.rb:35:in `format_step' 00:00:32.297 /mnt/home/jenkins-deploy/.gem/2.0.0/gems/cucumber-1.3.20/lib/cucumber/formatter/pretty.rb:155:in `step_name' ... 00:00:32.324 When I click the header edit button # features/step_definitions/header_steps.rb:10 00:00:32.324 And I enter "MODIFIED LABEL" as label # features/step_definitions/label_steps.rb:20 00:00:32.357 Build step 'Execute shell' marked build as failure 00:00:32.408 Finished: FAILURE
When I switched Cucumber to another formatter (progress), the job does not fail:
00:00:04.661 ... bundle exec cucumber --format progress features/label.feature:49 00:00:37.297 ...-----........ 00:00:37.297 00:00:37.297 1 scenario (1 passed) 00:00:37.297 8 steps (8 passed) 00:00:37.297 0m30.762s 00:00:37.435 Finished: SUCCESS
Tried updating Cucumber and it's dependencies, it did not help, the same error happens:
I have tried running the same Ruby version on my machine and Jenkins. Jenkins runs ruby 1.9.3p484:
... 16:08:41 + ruby -v 16:08:41 ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] ...
My machine:
$ ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin14.5.0] $ bundle exec cucumber --format pretty features/label.feature:49 ... 1 scenario (1 passed) 8 steps (8 passed) 0m21.577s
The scenario still runs fine on my machine.
Looking at the indent method:
p re p indent_string p amount p indent_string * amount
08:47:59 And I enter "MODIFIED LABEL" as label # features/step_definitions/label_steps.rb:20 08:47:59 /^(?!$)/ 08:47:59 " " 08:47:59 -2 08:47:59 negative argument (ArgumentError)
So amount is -2 which raise the issue.
$ irb irb(main):001:0> p "x" * 2 "xx" => "xx" irb(main):002:0> p "x" * -2 ArgumentError: negative argument from (irb):2:in `*' from (irb):2 from /usr/local/bin/irb:11:in `<main>' irb(main):003:0>
We attempted to debug it on the Jenkins slave itself but could not find why the source_indent would end up yelling -2 :-(
The job broke after this change, I think: https://github.com/wikimedia/integration-config/commit/700edd9
@dduvall @hashar @zeljkofilipin Do you know what's causing this issue? Is there anything we can do on our side?
The following lead us to think the problem might be fixed in cucumber 2.x:
https://github.com/cucumber/cucumber-ruby/issues/620
https://github.com/cucumber/cucumber-ruby/issues/762
WIP patches:
https://phabricator.wikimedia.org/rMSELdd7cdcbe67557b435a24f60bc516bed97f58eef0
https://github.com/wmde/WikidataBrowserTests/commit/104e77b6cdf993378413523d1e5a9010a9ed4e37
I'm wondering why it broke so suddenly. The scenarios that broke were not new at all. Were there a recent change to the cucumber version that is used?
@zeljkofilipin thx a lot for digging into this. If Cucumber 2.x really solves this issue, can we just update or are there other blockers for updating to a higher cucumber version?
As a workaround I remove the pretty formatter from https://integration.wikimedia.org/ci/view/BrowserTests/view/Wikidata/job/browsertests-Wikidata-WikidataTests-linux-firefox-sauce/ without commit that change to integration/config.git.
@zeljkofilipin and I paired on this today and discovered that commenting out RAITA_URL avoids the bug, so it's likely that something in the MediawikiSelenium::Raita formatter is causing the issue.
After some further debugging, we've narrowed it down to the --expand option that the Raita formatter forces. This is apparently a known issue, fixed in 2.0 with no backport to 1.3.
https://github.com/cucumber/cucumber-ruby/issues/620
The simplest way to reproduce the bug in the context of Wikidata tests is with bundle exec cucumber --format pretty --expand features/aliases.feature:39.
Upgrading our dependency to Cucumber 2.x is going to be necessary eventually but would involve quite a bit of refactoring to our formatters; we might want to backport a fix to 1.3 in the meantime.
Change 247602 had a related patch set uploaded (by JanZerebecki):
Work around cucumber pretty formater bug
I've submitted a pull request to the upstream 1.3.x branch. If they won't merge it for whatever reason, we also have the option of monkey patching String#indent to always delegate to Cucumber's version instead of Active Support (see this comment on the GH issue for details on why this isn't strictly a bug in Cucumber).
Change 275435 had a related patch set uploaded (by Zfilipin):
WIP Fix various problems with browsertests-Wikidata* jobs
Change 275435 merged by jenkins-bot:
Disable Raita and enable Cucumber pretty formatter for browsertests-Wikidata* jobs.
Dan patch for cucumber 1.3.x has been merged https://github.com/cucumber/cucumber-ruby/pull/926 :-)