Problem

  • update_prepare_d8_bootstrap() performs a range of adjustments, which are only executed when the System module schema is < 8000, which means they are not executed for D8 sites.

Goal

  • Allow me to upgrade my D8 DUG site. :)

Proposed solution

  1. Use individual conditions for the bootstrap adjustments performed in update_prepare_d8_bootstrap().
  2. Fix _drupal_bootstrap_configuration() to only set the error/exception handlers after config() is ready.
  3. Fix DrupalKernel to account for a potentially empty module list.
  4. Add update_get_schema_version() to retrieve the schema version of an extension.

Notes

  • With attached patch, I'm successfully able to update from a ~6 months old database dump.
  • Also attaching my head2head.php script, which needs to perform additional database adjustments before update.php is executed due to a few re-purposed module updates.

Related issues

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, head2head.0.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
1.98 KB
19.19 KB

Turns out that the existing upgrade path does not unset/unlock the overridden module list after performing base system adjustments in update_prepare_d8_bootstrap(), which means that the first request to update.php essentially implements #922996: Upgrade path is broken since update.php does not enforce empty module list already, but not any later/subsequent requests.

Due to control structure changes in this patch, the module list override is applied to all update.php requests but never unset, so all module updates that call into functions in .module files failed with a fatal error.

Attached patch ensures that the module list is reset back (unlocked), so .module files are loaded.

Adjusting update.php to not load any modules is out of scope here and left for aforementioned issue.

Status: Needs review » Needs work

The last submitted patch, head2head.2.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
813 bytes
19.39 KB

Fixed File module must not be enabled on existing D8 sites that do not need it.

sun’s picture

#4: head2head.4.patch queued for re-testing.

sun’s picture

Issue summary: View changes

Updated issue summary.

marcingy’s picture

As I understood head2head is not supported until a alpha is released? That was how it was in d7.

aspilicious’s picture

#6 true

aspilicious’s picture

Issue summary: View changes

Updated issue summary.

sun’s picture

Issue summary: View changes

Updated issue summary.

jibran’s picture

4: head2head.4.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 4: head2head.4.patch, failed testing.

sun’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Obsolete.