Page MenuHomePhabricator

Ensure that JS & PHP imageinfo requests return responsive urls in the same order
Closed, ResolvedPublic

Description

This is output after adding logging to AddMediaInfo pass just before these urls are added to the srcset attribute.

[subbu@earth:~/work/wmf/parsoid] echo "[[File:Foo.jpg|thumb]]" | php bin/parse.php --wt2html > /dev/null
RESPONSIVE URLS: {"1.5":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/0\/06\/Foo.jpg","2":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/0\/06\/Foo.jpg"}
[subbu@earth:~/work/wmf/parsoid] echo "[[File:Foo.jpg|thumb]]" | parse.js --useBatchAPI > /dev/null
RESPONSIVE URLS: {"2":"https://upload.wikimedia.org/wikipedia/commons/0/06/Foo.jpg","1.5":"https://upload.wikimedia.org/wikipedia/commons/0/06/Foo.jpg"}

This causes spurious diffs when comparing output of PHP and JS runs.

Event Timeline

ssastry triaged this task as Medium priority.Jun 27 2019, 4:15 AM
ssastry updated the task description. (Show Details)

Change 540973 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Sort responsive url list just like Parsoid/JS would (reverse density)

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

Change 540973 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Sort responsive url list just like Parsoid/JS would (reverse density)

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

Change 618169 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] Return responsiveUrls (srcset info) in ApiQueryImageInfo response

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

Change 618169 merged by jenkins-bot:
[mediawiki/core@master] Return responsiveUrls (srcset info) in ApiQueryImageInfo response

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