Problem/Motivation
In #2469431: BigPipe for auth users: first send+render the cheap parts of the page, then the expensive parts, we made sure BigPipe's no-JS detection doesn't interfere with the batch system's no-JS detection by disabling BigPipe on the system.batch_page.html route.
However, turns out that if you invoke ModuleInstaller during batch, which happens while syncing config (ConfigSync), that route rebuilding is not done immediately, which leaves the router in an inconsistent state, which can in turn cause BigPIpe to not know it shouldn't do it's no-JS detection. This is caused by #2589967: Rebuild routes immediately when modules are installed.
(See #5 for detailed root cause analysis.)
Proposed resolution
Since route rebuilding runs too late, \Drupal\big_pipe\EventSubscriber\NoBigPipeRouteAlterSubscriber::onRoutingRouteAlterSetNoBigPipe() also isn't called, and hence the _no_big_pipe route option is set for the system.batch_page.html route too late.
Hence the work-around is to hardcode it for now, until #2589967: Rebuild routes immediately when modules are installed is fixed.
Patch at #5.
Remaining tasks
Review.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2679547-5.patch | 564 bytes | wim leers |
| #4 | debug-2679547-4-do-not-test.patch | 2.57 KB | wim leers |
| #3 | debug-2679547-3-do-not-test.patch | 1.08 KB | wim leers |
| #2 | 2679547-2.patch | 5.83 KB | wim leers |
Comments
Comment #2
wim leersComment #3
wim leersThe IS says:
Apply this patch to HEAD (without #2) and run
ConfigImportAllTest. Now it will fail/stop at the point where a BigPipe no-JS<meta>refresh is added to a page that already has the Batch no-JS<meta>refresh. Which is exactly the thing we're working to understand.Comment #4
wim leersI found the root cause.
\Drupal\big_pipe\EventSubscriber\NoBigPipeRouteAlterSubscriber::onRoutingRouteAlterSetNoBigPipe()is called too late/in a separate request, which leaves the rebuilt routes without the route options that it sets… because that route option simply is not yet set.
It should always look like this:
So, the root cause is the routing system. Probably #2589967: Rebuild routes immediately when modules are installed.
Comment #5
wim leersBased on the research in #4, this should work, and local testing proves it does.
(With HEAD,
ConfigImportAllTestfails 100% of the time locally, with this patch, 0%.)Comment #6
wim leersMore accurate title.
Comment #7
wim leersIS updated with root cause.
Comment #8
wim leersIS updated with final proposed resolution.
Comment #9
swentel commentedConfigImportAllTest is green - so let's do this.
Comment #10
alexpottCommitted 94d96b4 and pushed to 8.1.x. Thanks!
Comment #12
alexpottI;e committed this during the commit freeze because it was holding back adding the migrate ui to core - a key target for 8.1.0 - and actaully this issue should have been critical.