Page MenuHomePhabricator

Configure the test system in such a way that it breaks when requested
Closed, ResolvedPublic

Description

Something like the following in the LocalSettings file

if($_GET['bebroken']){
	$wgWBRepoSettings['federatedPropertiesSourceScriptUrl'] = 'https://fsklafsalksfafaswikidata.beta.wmflabs.org/w/';
}

UPDATE:
add the following request parameter to the URL in order to simulate a network error: ?sourceApiResponse=404
example: https://wikidata-federated-properties.wmflabs.org/wiki/Item:Q1?sourceApiResponse=404

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 10 2020, 10:55 AM

Change 604442 had a related patch set uploaded (by Silvan Heintze; owner: Silvan Heintze):
[mediawiki/extensions/Wikibase@master] FP: Simulate API errors on the test system

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

The patch only changes the ansible file templates. Apply to the test system by cd'ing into /build/federated-properties and running:

# ansible-playbook fedProps.yml --limit wikidata-federated-properties.wikidata-dev.eqiad.wmflabs

An error can then be simulated by appending the request parameter ?sourceApiResponse=404 to the URL: https://wikidata-federated-properties.wmflabs.org/wiki/Item:Q1?sourceApiResponse=404

Change 604442 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] FP: Simulate API errors on the test system

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

Silvan_WMDE updated the task description. (Show Details)Jun 11 2020, 2:08 PM

Changing the trigger mechanism from request parameter to request header, so that AJAX requests can be manipulated to "break" the system, too. A network error to the source wiki is now triggered, when the request header

X-FedProps-SourceApiResponse: 404

is set. Use a browser extensions such as ModHeader to add the custom header to your request.

Change 606193 had a related patch set uploaded (by Silvan Heintze; owner: Silvan Heintze):
[mediawiki/extensions/Wikibase@master] FP: Simulate API errors via HTTP request header

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

Change 606193 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] FP: Simulate API errors via HTTP request header

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

Samantha_Alipio_WMDE closed this task as Resolved.Jun 24 2020, 8:55 AM