WMDE-leszek created this task.
WMDE-leszek added projects: Wikidata, Wikidata-Campsite.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION

As can be seen e.g. in https://integration.wikimedia.org/ci/job/selenium-daily-beta-WikibaseLexeme/135/console
Tests that try to create items on beta fail with API error:

13:16:11 Unhandled rejection Error: failed-save: The save has failed.
13:16:11     at rawRequest.then (/src/node_modules/mwbot/src/index.js:257:31)
13:16:11     at tryCatcher (/src/node_modules/bluebird/js/release/util.js:16:23)
13:16:11     at Promise._settlePromiseFromHandler (/src/node_modules/bluebird/js/release/promise.js:512:31)
13:16:11     at Promise._settlePromise (/src/node_modules/bluebird/js/release/promise.js:569:18)
13:16:11     at Promise._settlePromise0 (/src/node_modules/bluebird/js/release/promise.js:614:10)
13:16:11     at Promise._settlePromises (/src/node_modules/bluebird/js/release/promise.js:694:18)
13:16:11     at _drainQueueStep (/src/node_modules/bluebird/js/release/async.js:138:12)
13:16:11     at _drainQueue (/src/node_modules/bluebird/js/release/async.js:131:9)
13:16:11     at Async._drainQueues (/src/node_modules/bluebird/js/release/async.js:147:5)
13:16:11     at Immediate.Async.drainQueues (/src/node_modules/bluebird/js/release/async.js:17:14)
13:16:11     at runCallback (timers.js:672:20)
13:16:11     at tryOnImmediate (timers.js:645:5)
13:16:11     at processImmediate [as _immediateCallback] (timers.js:617:5)

For real sites it seems reasonable to use the "real" test user account while making, at least, certain edits. This would allow to overcome some possible site-specific permissions restrictions, edit-rate limits etc.
Logging step has been excluded from tests because when run locally, or as part of per-patch Jenkins jobs, the user specific restrictions are not really an issue.

It seems that the Jenkins job is already passing the test user credentials to env as MEDIAWIKI_USER and MEDIAWIKI_PASSWORD.
Tests could make use of this.

One possible way to solve the problem with test runs against real sites would be to check if credentials are passed to the environment and (attempt to) log in using this in such case.
Alternatively, it might be always required to log in, and it would always be needed for the test user to exist, also in local wiki case.


TASK DETAIL
https://phabricator.wikimedia.org/T213092

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WMDE-leszek
Cc: Addshore, WMDE-leszek, Aklapper, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, D3r1ck01, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to