Page MenuHomePhabricator

[weird] Wikidata SPARQL query results not the same when exported
Closed, ResolvedPublic8 Story Points

Description

Hi,

Tonight I stumbled upon my weirdest wikidata-related bug so far.

I do a simple query on http://query.wikidata.org/ (list of embassies in France : http://tinyurl.com/y8yq6oq8 ) ; I've got the correct results. But I export (either in TSV, TSV verbose, CSV or HTML) I've got totally different data.

Weirder, when I ask on Twitter (https://twitter.com/belett/status/998636026900959233), no one else seem to have this bug.

Even weirder, I tested and the bug appears on Firefox (60.0.1 - 64 bits) but not on Chrome nor on Edge Oo

Details

Related Gerrit Patches:

Event Timeline

VIGNERON created this task.May 21 2018, 7:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 21 2018, 7:19 PM

Huh, I can reproduce this on my work laptop, but not on my private PC… (both using Firefox)

VIGNERON updated the task description. (Show Details)May 21 2018, 7:33 PM
abian added a subscriber: abian.May 21 2018, 8:17 PM

The language in which I get the online query is correct, the one requested with SERVICE wikibase:label, while the language of the dump is the one configured for the Wikidata Query UI.

From the command line, the output is also correct.

$ curl 'https://query.wikidata.org/sparql?query=SELECT%20%3Fq%20%3FqLabel%20WHERE%20%7B%0A%20%20%3Fq%20wdt%3AP31%20wd%3AQ3917681%20%3B%20wdt%3AP17%20wd%3AQ142%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22fr%2Cen%22.%20%7D%0A%7D%0A'
abian added a comment.May 21 2018, 8:28 PM
This comment was removed by abian.
abian added a comment.May 21 2018, 8:34 PM

I thought this was because of the ;, but seems to be more complex, sometimes it happens and sometimes it doesn't.

New development, today, on the Status updates I see the same kind of bug (columns given are not what is asked on the SELECT) but on the online result itself (so before export) : query

New development, today, on the Status updates I see the same kind of bug (columns given are not what is asked on the SELECT) but on the online result itself (so before export) : query

And it disappeared, very strange bug...

I can’t reproduce it anymore either.

But in any event… the only network requests triggered by the download buttons that I can see is one request to statsv, to track the button click. As strange as it is, somehow this bug must be happening client-side… unless there are extra network requests when the bug can be reproduced?

Seb35 added a subscriber: Seb35.May 27 2018, 6:17 PM

I reproduced this bug today with this request with Firefox, and someone I know reproduced it today and yesterday on his computer with different queries. Yesterday he was able to pass over this bug by changing a comment (to re-compute the query). I just asked on IRC and User:Pintoch said s/he saw this bug too.

hoo added a subscriber: hoo.May 27 2018, 6:32 PM

I think this is misc. queries getting downloaded, but not the displayed one. Way to reproduce: Run a query, click "Show" in the "Query Helper" on the left, download the result.

I have observed this bug multiple times now (also using Firefox).

I think this is misc. queries getting downloaded, but not the displayed one. Way to reproduce: Run a query, click "Show" in the "Query Helper" on the left, download the result.

OOOOOHHHhhhh. That.

So basically the same thing as T193861: WDQS UI reports absurd query runtime if auxiliary queries are run concurrently with the main query – auxiliary queries being mixed up with the main query, except this time it affects the download instead of the runtime? That explains why the query looked similar but the result columns were altered, I think.

Vvjjkkii renamed this task from [weird] Wikidata SPARQL query results not the same when exported to hjcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from hjcaaaaaaa to [weird] Wikidata SPARQL query results not the same when exported.Jul 2 2018, 4:00 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Jonas set the point value for this task to 8.Sep 4 2018, 1:31 PM
Jonas moved this task from Ready to estimate to In Progress on the Wikidata-Campsite board.
Addshore added a subscriber: Jonas.EditedSep 18 2018, 9:28 AM

@Jonas should this be on Wikidata-Campsite (Wikidata-Campsite-Iteration-∞) as it is estimated and in the "In progress" col? Did we pick it up?

Addshore moved this task from incoming to in progress on the Wikidata board.Sep 18 2018, 2:25 PM
Addshore triaged this task as Normal priority.Sep 19 2018, 7:02 AM
Pintoch removed a subscriber: Pintoch.Sep 19 2018, 12:40 PM

Change 461949 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[wikidata/query/gui@master] Fix: Wikidata SPARQL query results not the same when exported

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

Unfortunately I can not reproduce the problem.
I have an idea what could be wrong and fixed it.

Change 461949 merged by jenkins-bot:
[wikidata/query/gui@master] Fix: Wikidata SPARQL query results not the same when exported

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

Change 461995 had a related patch set uploaded (by WDQSGuiBuilder; owner: WDQSGuiBuilder):
[wikidata/query/gui-deploy@production] Merging from 97444f08bcfd9e0ac90ae8a61cbbb7428fc625c3:

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

Change 461995 merged by Smalyshev:
[wikidata/query/gui-deploy@production] Merging from 97444f08bcfd9e0ac90ae8a61cbbb7428fc625c3:

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