Page MenuHomePhabricator

Wikidata description change doesn't trigger mobile-sections update
Closed, ResolvedPublic

Description

https://www.wikidata.org/wiki/Q4115189 is linked to
Wikipedia:Wikidata/Wikidata Sandbox on enwiki, which I use to test Wikidata description editing.
I was able to make a successful edit from the app, it was reflected on https://www.wikidata.org/wiki/Q4115189

The problem is that this change was not propagated to https://en.wikipedia.org/api/rest_v1/page/mobile-sections-lead/Wikipedia%3AWikidata%2FWikidata_Sandbox. Change Prop doesn't seem to get triggered for this.

Event Timeline

https://grafana.wikimedia.org/dashboard/db/eventbus?panelId=10&fullscreen on-wikidata-description-change_delay only shows values of 1-2 seconds. Not sure if this is for Wikidata description to summary or Wikidata description to mobile-sections change propagation.

Pchelolo edited projects, added Services (doing); removed Services.
Pchelolo subscribed.

Ok, I know what's happening. Since most of the wikidata item changes are not related to the description, and the only part of the item used by Mobile-Content-Service, we've implemented a hack that allowed us to filter out only the changes to the description. It's based on the edit comment and the fact that you can't change the comment when editing a wikidata item. However, the solution wasn't complete, apparently when edit is done via the API (as it's done here from the app) whe comment is different. It's /* wbsetdescription-set:1|en */ I will add it to the ChangeProp rule and it will be fixed.

Change 318657 had a related patch set uploaded (by Ppchelko):
Add alternative comment type to wikidata description.

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

Maybe it would be good if someone from the Wikidata team could confirm that this is a good way to detect changes of the description property or offer a better way.

@daniel Your input on this would be much appreciated. A more generic question is whether it's possible to detect what exactly was changed in the wikidata item from the RevisionInsertComplete hook? If there was a way, we could consider moving that detection to the Event-Platform extension and implement the fragments solution described in T148079

In the meantime I propose to deploy the workaround changes to unblock the apps team's effort on editing the wikidata description from the app.

Change 318657 merged by Mobrovac:
Add alternative comment type to wikidata description.

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

mobrovac subscribed.

The work-around has been deployed, so the imminent problem should be resolved, but let's continue the discussion about finding the proper way of dealing with this.

Thanks. For the case where the Wikidata description edit happens from the Android app that works now. :)

(BTW, the app patch has been merged. It's in the Alpha build. We still need to add some more patches to show a success/failure screen at the end, deal with tokens/abusefilters/etc..)

I think I'm still seeing this issue today. @bearND, can you confirm?

@Niedzielski It works for me. I just edited the description of Wikipedia:Wikidata/Wikidata Sandbox on enwiki from the app.

@bearND, thanks for checking. I swear this wasn't working earlier but it is now. Should this issue be closed?

I want to keep this one open for a bit to give the Wikidata folks a chance to provide info if our solution could be improved. We might have to add more to the regex. There could be also a whole different way to restrict WD events to description changes.

mobrovac changed the task status from Open to Stalled.Nov 9 2016, 8:43 PM

I want to keep this one open for a bit to give the Wikidata folks a chance to provide info if our solution could be improved. We might have to add more to the regex. There could be also a whole different way to restrict WD events to description changes.

Setting as stalled until that happens :)

Moving this back off the kanban board and to Tracking on the main app board since I don't think there's anything for Android engineering to do at this point.

I want to keep this one open for a bit to give the Wikidata folks a chance to provide info if our solution could be improved. We might have to add more to the regex. There could be also a whole different way to restrict WD events to description changes.

@bearND: 3.5 years later, did you ask Wikidata folks to provide info and have they provided it somewhere outside this task? :)
Tasks should not remain stalled (and forgotten) forever (and I'm als wondering if this task should really have an assignee - probably not?).

Good catch. I think this is done. I don't remember getting any extra info from Wikidata folks about this.