Page MenuHomePhabricator

Provide a way to know which revision was fetched while retrieving the latest html for a page title
Closed, ResolvedPublic

Description

The RESTBase api to get HTML of a page using its latest revision does not provide a way to know which revision was fetched. The revision id is present in the content it fetched, but that need HTML parsing.

Parsoid used to provide content-revision-id header to help this usecase.

Will it be possible to get the revision id of the content it fetched without parsing and without additional api hits?

This is related to T92359

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterMake sure CX know the revision id

Event Timeline

santhosh created this task.Apr 28 2015, 6:43 AM
santhosh raised the priority of this task from to Needs Triage.
santhosh updated the task description. (Show Details)
santhosh added subscribers: santhosh, GWicke.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2015, 6:43 AM
santhosh set Security to None.

Change 207040 had a related patch set uploaded (by Santhosh):
Make sure CX know the revision id

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

santhosh triaged this task as Medium priority.Apr 28 2015, 10:37 AM
GWicke added a comment.EditedMay 1 2015, 8:55 PM

Would it help if we returned an ETag header like this?

ETag: "123456/c4e494da-ee8f-11e4-83a1-8b80de1cde5f"

The first part would be the revision, the part after the / the timeuuid. You can basically append the entire etag to the request URL to re-retrieve the exact same render, or you can append just the revision part.

Would it help if we returned an ETag header like this?

ETag: "123456/c4e494da-ee8f-11e4-83a1-8b80de1cde5f"

The first part would be the revision, the part after the / the timeuuid. You can basically append the entire etag to the request URL to re-retrieve the exact same render, or you can append just the revision part.

Sounds good to me. But please keep the revision ID in the head around, at least for now, because VE depends on it.

Sounds good to me. But please keep the revision ID in the head around, at least for now, because VE depends on it.

Yes, no changes planned there.

cscott added a comment.May 1 2015, 9:25 PM

Yes, OCG requires the revision in the <head> as well. But +1 on the ETag.

GWicke moved this task from Backlog to In progress on the RESTBase board.May 2 2015, 12:02 AM
GWicke closed this task as Resolved.May 2 2015, 12:19 AM
GWicke claimed this task.

The patch is now merged, and should enter production on Monday.

Change 207040 abandoned by Santhosh:
Make sure CX know the revision id

Reason:
Since T97393 has a fix in RESTBase now

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

@santhosh, this is now deployed.

@GWicke, Thanks. verified.