Page MenuHomePhabricator

selenium-QuickSurveys browser test went from 20 seconds to 1+ minute
Closed, DuplicatePublic

Description

The job https://integration.wikimedia.org/ci/job/selenium-QuickSurveys/ recently went from a runtime of 20 seconds up to more than one minute. It targets the beta cluster.

Sep 8, 2019 2:13:00 AM - https://integration.wikimedia.org/ci/job/selenium-QuickSurveys/1330/BROWSER=chrome,MEDIAWIKI_ENVIRONMENT=beta,PLATFORM=Linux,label=BrowserTests/console
Sep 9, 2019 2:13:00 AM - https://integration.wikimedia.org/ci/job/selenium-QuickSurveys/1331/BROWSER=chrome,MEDIAWIKI_ENVIRONMENT=beta,PLATFORM=Linux,label=BrowserTests/console

00:00:02.573 @chrome @firefox @vagrant @integration @en.m.wikipedia.beta.wmflabs.org
00:00:02.574 Feature: Integration
00:00:02.574 
00:00:02.574   Scenario: Survey is visible with quicksurvey=true flag                                   # tests/browser/features/integration.feature:6
00:00:21.450     Given the quick survey test pages are installed                                        # tests/browser/features/support/step_definitions/common_steps.rb:1
00:00:21.451     When I am on the "Quick survey test page stub" page with the quick survey flag enabled # tests/browser/features/support/step_definitions/common_steps.rb:28
00:00:21.452     And the page has fully loaded                                                          # tests/browser/features/support/step_definitions/common_steps.rb:88
00:00:21.453     And the survey code has fully loaded                                                   # tests/browser/features/support/step_definitions/common_steps.rb:99
00:00:21.453     Then I should see the survey                                                           # tests/browser/features/support/step_definitions/common_steps.rb:79
00:00:21.454 
00:00:21.454 1 scenario (1 passed)
00:00:21.454 5 steps (5 passed)
00:00:21.454 0m18.887s
00:00:04.771 @chrome @firefox @vagrant @integration @en.m.wikipedia.beta.wmflabs.org
00:00:04.772 Feature: Integration
00:00:04.772 
00:00:04.772   Scenario: Survey is visible with quicksurvey=true flag                                   # tests/browser/features/integration.feature:6
00:01:13.654     Given the quick survey test pages are installed                                        # tests/browser/features/support/step_definitions/common_steps.rb:1
00:01:13.655     When I am on the "Quick survey test page stub" page with the quick survey flag enabled # tests/browser/features/support/step_definitions/common_steps.rb:28
00:01:13.655     And the page has fully loaded                                                          # tests/browser/features/support/step_definitions/common_steps.rb:88
00:01:13.656     And the survey code has fully loaded                                                   # tests/browser/features/support/step_definitions/common_steps.rb:99
00:01:13.657     Then I should see the survey                                                           # tests/browser/features/support/step_definitions/common_steps.rb:79
00:01:13.658 
00:01:13.658 1 scenario (1 passed)
00:01:13.658 5 steps (5 passed)
00:01:13.658 1m8.897s

Would be nice to find out whether it is a regression on beta cluster / QuickSurveys / MediaWiki core or whatever else.

Event Timeline

Since this a long deprecated Ruby framework, I would rather that we delete this job than to invest time in investigation.

I filled that task solely because the time went up. That indicates there is most probably an issue on the beta cluster somewhere rather than in the framework itself. So I would like to reproduce the run locally, see whether it is slow as well and find out the root cause.

So the bulk of the time is spend on Given the quick survey test pages are installed which creates several pages via the MediaWiki api.

The pages are apparently recreated several times for each scenario.

All the api actions turns out to be extremely slow, most probably due to an issue on the beta cluster?

hashar claimed this task.

So the issue was that all the requests to MediaWiki were unusually slow which was easy to reproduce locally.

The last good build was Sep 8 2:13:00 AM, and the first bad at Sep 9, 2019 2:13:00 AM.

That is consistent with T232796: [betalabs] memcached listens solely on 127.0.0.1 (was: Cannot create a new user account) which boiled down to memcached no more being available since Sep 8th 06:42 AM thus the wikis running without any cache and unsurprisingly being super slow.