Page MenuHomePhabricator

[weird] Wikidata SPARQL query results not the same when exported
Closed, ResolvedPublic8 Estimated 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.

test.png (716×1 px, 72 KB)

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

Event Timeline

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

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'
This comment was removed by abian.

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?

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.

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.

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

Addshore triaged this task as Medium priority.Sep 19 2018, 7:02 AM

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