Page MenuHomePhabricator

Pass MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD in on Jenkins so GettingStarted browser tests pass
Closed, ResolvedPublic

Description

Now that we're testing GettingStarted tests with an actual registration, Jenkins needs to pass in the password so the CAPTCHA can be bypassed. The support for doing this (given the password) was recently merged into GettingStarted: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FGettingStarted.git/554a2e12d4855c00f2e6d7145f3d528bc9563db0/tests%2Fbrowser%2Ffeatures%2Fsupport%2Fpages%2Fregistration_page.rb .

Until this is done, the tests will fail.

Event Timeline

I forgot to mention. The password is stored as wmgCaptchaPassword in /srv/mediawiki/wmf-config/PrivateSettings.php on deployment-bastion.

phuedx added a comment.Mar 2 2015, 8:59 AM

After this work has been done – and the GettingStarted browser tests are passing consistently! – we should document this approach somewhere so that other teams start to use it as well.

zeljkofilipin set Security to None.Mar 2 2015, 11:12 AM
zeljkofilipin added a subscriber: hashar.
hashar added a comment.Mar 2 2015, 3:16 PM

The secret password has to be added to the Jenkins credentials store. Direct link https://integration.wikimedia.org/ci/credential-store/domain/browsertests/newCredentials and:

Kind: Secret text
Scope: Global
Secret: <whatever the password is>
Description: a meaningful description that will show up on https://integration.wikimedia.org/ci/credential-store/domain/browsertests/

Click [advanced] which would reveal the ID field which is how we refer to the password in JJB (via credential-id).

Then in JJB, adjust the default to bind to the newly available credential. The actual one is https://github.com/wikimedia/integration-config/blob/93aa8fbb211817374dd1793b73b84b3c801f9590/jjb/job-templates-browsertests.yaml#L143-L149 , you will probably want to use the JJB test type (see upstream doc).

Change 194749 had a related patch set uploaded (by Mattflaschen):
Pass MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD to GettingStarted browser test

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

Mattflaschen-WMF raised the priority of this task from High to Unbreak Now!.

Yes, I've been trying to get this reviewed for weeks now.

hashar claimed this task.Mar 30 2015, 3:15 PM

The necessary credential has been [[ added to the Credential store | https://integration.wikimedia.org/ci/credential-store/domain/browsertests/credential/mediawiki_captcha_password/update ]] with id mediawiki_captcha_password.

@Mattflaschen proposed the related JJB config change https://gerrit.wikimedia.org/r/194749 . I haven't seen it until now. Reviewing right now, will refresh the job configuration, run it and see what happens.

I have tweaked the patch to pass the variable to all browser test jobs.

I have refreshed and retriggered the job https://integration.wikimedia.org/ci/job/browsertests-GettingStarted-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce/ and it PASS!

So it is fixed, but now pending review/approval of the JJB change.

This remains pending review.

Change 194749 merged by jenkins-bot:
Pass MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD to GettingStarted browser test

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

hashar added a comment.Apr 7 2015, 9:01 AM

I forgot to +2 the patch https://gerrit.wikimedia.org/r/#/c/194749/ but confirmed it fixed the build.

Can't test again right now because the CI slaves can no more reach beta.wmflabs.org since the DNS yield the public IPs instead of the instances private ones.

The DNS failure (T95273) has been fixed. The last run of the job at https://integration.wikimedia.org/ci/job/browsertests-GettingStarted-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce/433/console is showing a single failure :-)

It seems the captcha is properly passed.

EBernhardson closed this task as Resolved.Apr 9 2015, 5:37 PM
EBernhardson added a subscriber: EBernhardson.

The DNS failure (T95273) has been fixed. The last run of the job at https://integration.wikimedia.org/ci/job/browsertests-GettingStarted-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce/433/console is showing a single failure :-)

I fixed this by running populate_categories (in the GettingStarted repository). Thanks to everyone for their help with this.