Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295528

Distribution updates run in an unpredictable order

$
0
0

Think of this as sequel to #211182: Updates run in unpredictable order.
I've encountered this in D7, but the code doesn't look much different in D8, so I'm assuming it's just as problematic.

Current situation:
- Update order doesn't respect module weight
- We have hook_update_dependencies() as the only mechanism of controlling update order.

Installation profiles have a weight of 1000 in D7's system table.
But since that is ignored, the distribution updates end up running in the middle of other module updates.
(Seems to be alphabetical. Panopoly's "P" is late enough that they rarely see it, but Commerce Kickstart's "C" is very early...)
Now, most distribution updates enable or disable modules, triggering cache rebuilds,
which causes errors from any module that doesn't have an expected schema update applied yet.
For example, Rules is adding an "owner" column, but before that update runs, a Kickstart update enables a module,
triggers cache rebuilding, and Rules dies because it runs a query against the table without the "owner column".

This means that a distribution needs to declare update dependencies on any potentially problematic contrib updates (== all of them).
So I consider it a DX fail that Kickstart and Panopoly need to add hacks instead of being able to assume that their updates run in an "updated" environment.

I am guessing that the update hooks aren't ordered by module weight first for a reason, so maybe we can at least make the installation profile updates
run last?


Viewing all articles
Browse latest Browse all 295528

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>