Skip to content

Media: Remove revision parameter#1021

Closed
mdholloway wants to merge 1 commit intowikimedia:masterfrom
mdholloway:media-params
Closed

Media: Remove revision parameter#1021
mdholloway wants to merge 1 commit intowikimedia:masterfrom
mdholloway:media-params

Conversation

@mdholloway
Copy link
Copy Markdown
Contributor

Updates this to reflect that the MCS media endpoint no longer supports
specific revision requests as of the updates in the most recent
deployment.

@Pchelolo
Copy link
Copy Markdown
Contributor

Why doesn't it? It would be fairly weird for the user if they read one revision of a page, and while they're reading a new revision with completely different media pops up

@mdholloway
Copy link
Copy Markdown
Contributor Author

It can't because the MediaWiki API query now used to get the file page titles only considers the latest revision, and there's apparently no way to specify a previous revision.

If that's a problem for clients then that's a strong argument in favor of reverting the change (which didn't really help on performance as intended).

@Pchelolo
Copy link
Copy Markdown
Contributor

If that's a problem for clients then that's a strong argument in favor of reverting the change (which didn't really help on performance as intended).

For that we better ask the apps teams or product managers, I was just wondering what happened

@mdholloway
Copy link
Copy Markdown
Contributor Author

AFAIK the apps only request pages by title and not by rev ID, but let's ping @dbrant and @joewalsh for comment.

Updates this to reflect that the MCS media endpoint no longer supports
specific revision requests as of the updates in the most recent
deployment.
@jdforrester
Copy link
Copy Markdown
Member

It can't because the MediaWiki API query now used to get the file page titles only considers the latest revision, and there's apparently no way to specify a previous revision.

The reason is that the information we're requesting is stored in the page_props table, which only has data for the latest revision by design, and so for performance reasons the API doesn't let you try to ask it to calculate live the information requested each time.

@berndsi
Copy link
Copy Markdown
Contributor

berndsi commented Jul 12, 2018

I would prefer keeping the ability to specify an older version. The media information is something which could reasonably be requested quite some time after the corresponding page was loaded. It's important that the media info matches the loaded page.

@mdholloway
Copy link
Copy Markdown
Contributor Author

Yeah, especially since the patch didn't actually move the needle on performance, it's probably not worth giving up the ability to specify a revision. I'll revert.

@mdholloway
Copy link
Copy Markdown
Contributor Author

@mdholloway mdholloway closed this Jul 12, 2018
@d00rman d00rman added the API label Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants