Ideally we would use an API that only gives us the changes list, but for a quick and dirty solution we could at least add a parameter that returns only the changes list and none of the rest of the UI.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | SBisson | T167743 Implement 'Live Updates' feature for RC page filters | |||
Resolved | Catrope | T173614 Graduate Live Update out of beta | |||
Resolved | SBisson | T173613 Make "live update" not download the entire RC page every 3 seconds |
Event Timeline
What is being downloaded every 3 seconds is a page with
- the standard MW chrome
- the no-js RC form with show/hide toggles
- 0 or 1 recent change (because ?limit=1).
Note that contrary to a regular page load, none of the linked assets are being pulled.
By-passing #2 and #3 doesn't seem to have a noticeable effect on size and speed (tested locally with curl in a loop) but removing all of #1 might. Is there a way in MW to send a code and by-pass all the standard chrome and whatever is added to the output before or after?
https://en.wikipedia.org/wiki/Special:RecentChanges?useskin=apioutput
This is a special skin, which is actually intended for the human-readable API pages (e.g. https://en.wikipedia.org/w/api.php?action=query&list=allpages).
However, it turns out to work here.
This does mean the output isn't using the user's normal skin. I don't think that affects anything in the actual line being extracted, but I'm not 100% sure.
Change 376041 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/core@master] RCFilters: Live Update: download less data
Change 376041 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Live Update: download less data
@SBisson
In betalabs I do not see 'Live updates' working. Also, 'View newest changes' does not work either. I was checking RC page with no filters at all to ensure that all changes will be displayed.
I checked test wiki and enwiki (wmf.17) - 'View newest changes' works there fine.
I confirm: "Live update" and "View newest" are not working in betalabs. The polling URL[1] returns 503 (works fine without peek=1)
I need to investigate why this works fine locally but not on betalabs. Maybe @Catrope has an idea?
If need be we can just remove the peek parameter before it goes live next week.
Change 377246 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/core@master] RCFilters: Live update: disable peek param
I only see a HTTP 503 in the case that should return a HTTP 304 – otherwise, I correctly get an empty page with HTTP 200. Perhaps our caching layer doesn't like the 304. Try just using a HTTP 200 always and instead returning the information in the body (e.g. a '1' or '0')?
Change 377246 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Live update: disable peek param
Change 377800 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/core@master] RCFilters: Live update: no data returns 204
Change 377800 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Live update: no data returns 204