Page MenuHomePhabricator

[Spike 2hrs] BetaCluster incorrectly points SameAS to production Wikidata
Closed, ResolvedPublic0 Estimated Story Points

Description

The BetaCluster json+ls incorrectly fills the sameAs property in the jsonld schema. The sameAs should point to the betacluster wikibase, not to the production one.

Steps to reproduce

  1. Go to https://en.wikipedia.beta.wmflabs.org/wiki/World (which is linked to Q500927)
  2. Hover over a WikiBase item menu item on the left side (Vector skin), The link points to https://wikidata.beta.wmflabs.org/wiki/Special:EntityPage/Q500927
  3. Open the developer console and check the page HTML, find the sameAs definition:
<script type="application/ld+json">{
  "@context":"https:\/\/schema.org",
  "@type":"Article",
  "name":"World",
  "url":"https:\/\/en.wikipedia.beta.wmflabs.org\/wiki\/World",
  "sameAs":"http:\/\/www.wikidata.org\/entity\/Q500927",
  "mainEntity":"http:\/\/www.wikidata.org\/entity\/Q500927",
  "author":{
    "@type":"Organization",
    "name":"Contributors to Wikimedia projects"
  },
  "publisher":{
    "@type":"Organization",
    "name":"Wikimedia Foundation, Inc.",
    "logo":{
      "@type":"ImageObject",
      "url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"
    }
  },
  "datePublished":"2015-11-12T17:16:19Z",
  "dateModified":"2017-03-21T20:42:10Z",
  "image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/9\/97\/The_Earth_seen_from_Apollo_17.jpg",
  "headline":"This world is a planet where a society of people has formed."
}</script>

As you see in the attached script tag, both sameAs and mainEntity point to the www.wikidata.org passing the beta-cluster Q500927 identifier.

Event Timeline

ovasileva renamed this task from BetaCluster incorrectly points SameAS to production Wikidata to [Spike 2hrs] BetaCluster incorrectly points SameAS to production Wikidata.Nov 13 2018, 6:16 PM

I think this is because wmgWikibaseClientRepoConceptBaseUri is set to:

'wmgWikibaseClientRepoConceptBaseUri' => [
	'default' => 'http://www.wikidata.org/entity/'
	...
],

It should be HTTPS and also include a -labs override. I'll submit patches.

Change 473292 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[operations/mediawiki-config@master] Prod use HTTPS for Wikidata repoConceptBaseUri

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

I agree it probably needs a -labs override, but shouldn’t that be unrelated to the HTTP/HTTPS question?

I agree it probably needs a -labs override, but shouldn’t that be unrelated to the HTTP/HTTPS question?

Yes, sorry for confusing this issue. I will submit a patch the updates the mediawiki-config with your patch commentary instead of changing to HTTPS.

Jdlrobson set the point value for this task to 0.Nov 14 2018, 6:29 PM

Change 473835 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[operations/mediawiki-config@master] BC Wikibase: override repoConceptBaseUri

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

We should always refer to entities with the same entity URI. And we've so far always stuck to http for entity URIs.

Code looks ok, tommorrow I'll merge the code to beta cluster

Change 473292 merged by Pmiazga:
[operations/mediawiki-config@master] Doc: add repoConceptBaseUri comment

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

Change 473835 merged by jenkins-bot:
[operations/mediawiki-config@master] beta: Wikibase: override repoConceptBaseUri

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

Mentioned in SAL (#wikimedia-operations) [2018-11-20T22:54:19Z] <pmiazga@deploy1001> Synchronized wmf-config: SYNC: noop [[gerrit:473292|Doc: add repoConceptBaseUri comment (T209352)]][[gerrit:475006|noop: Remove utf-8 characters from DOC comment for better readability (T209352)]][[gerrit:473835|beta: Wikibase: override repoConceptBaseUri (T209352)]] (duration: 00m 49s)

Mentioned in SAL (#wikimedia-operations) [2018-11-20T22:54:19Z] <pmiazga@deploy1001> Synchronized wmf-config: SYNC: noop [[gerrit:473292|Doc: add repoConceptBaseUri comment (T209352)]][[gerrit:475006|noop: Remove utf-8 characters from DOC comment for better readability (T209352)]][[gerrit:473835|beta: Wikibase: override repoConceptBaseUri (T209352)]] (duration: 00m 49s)

Mentioned in SAL (#wikimedia-operations) [2018-11-20T22:54:19Z] <pmiazga@deploy1001> Synchronized wmf-config: SYNC: noop [[gerrit:473292|Doc: add repoConceptBaseUri comment (T209352)]][[gerrit:475006|noop: Remove utf-8 characters from DOC comment for better readability (T209352)]][[gerrit:473835|beta: Wikibase: override repoConceptBaseUri (T209352)]] (duration: 00m 49s)

I'll be able to sign off this task once Beta Cluster gets out of the maintenance. Right now the cluster is in read-only mode.

Everything works as expected.