Page MenuHomePhabricator

Add UA to node -> mediawiki requests
Closed, ResolvedPublic2 Story Points

Description

Useragent should be added to Mediawiki requests saying that this is from the termbox.

It may be possible to cheaply add the version. If so we could do this but we shouldn't spend loads of time on it. For example https://stackoverflow.com/a/36733261/5576051 suggests that we could use:
import {version} from './package.json';

Event Timeline

It adds a level of indirection but the blubber.version should be realatively readily available and is a form of pinning that already is performed (i.e. no extra effort)

Lea_WMDE set the point value for this task to 2.Mar 13 2019, 3:27 PM
Lea_WMDE added a subscriber: Lea_WMDE.

At this stage we would be introducing logging that is not being read by anyone. This ticket is only about adding a line of meta data to the requests we send.

Addshore moved this task from incoming to in progress on the Wikidata board.Mar 25 2019, 4:04 PM

Change 508499 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[wikibase/termbox@master] User-Agent

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

Hey maybe a tiny question but with probably big consequences:
As Jakob pointed out, it is good to be stick on the User-Agent policy[ 1 ] of Mediawiki. That also means we have to make smaller changes to the package.json and fill it with the author field[ 2 ]. So what are the correct values for name, email, url?

[ 1 ]: https://meta.wikimedia.org/wiki/User-Agent_policy
[ 2 ]: https://flaviocopes.com/package-json/#author

Let me check and get back to you!

Tarrow added a comment.May 8 2019, 8:44 AM

The author field for WikibaseLexeme (from extension.json not package.json) for example is "The Wikidata team". This might suffice?

Change 508499 merged by jenkins-bot:
[wikibase/termbox@master] User-Agent

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

Jakob_WMDE closed this task as Resolved.Wed, May 22, 9:26 AM