Problem/Motivation

updb varbase_core_update_90006 issue causing upgrade from Drupal 8 to 9 to abort. The problem arises from /Drupal::classResolver()->getInstanceFromDefinition(EntityDefinitionUpdateManager::class)->applyUpdates(); attempting to update an entity type that is not prepared for updates. The affected entity types need a hook updb to resolve their entity type, but the upgrade is halted by the varbase_core_update_90006 error.

drush entity-updates
The following updates are pending:

entity_subqueue entity type : 
The Entity subqueue entity type needs to be updated.
The Revision ID field needs to be installed.
The Default translation field needs to be installed.
The Default revision field needs to be installed.
The Revision translation affected field needs to be installed.
node entity type : 
The node.field_project_logo field needs to be updated. 

 Do you wish to run all pending updates? (yes/no) [yes]:
 > yes


In DevelEntityDefinitionUpdateManager.php line 169:
                                                                                           
  The entity schema update for the entity_subqueue entity type requires a data migration.  

Steps to reproduce

Proposed resolution

  • Remove /Drupal::classResolver()->getInstanceFromDefinition(EntityDefinitionUpdateManager::class)->applyUpdates(); from hook updb and use varbase drush command (edupdb) to update entity after updb finishes
  • Ensure a smoother upgrade process.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0, varbase_core-10.0.24, varbase-9.1.4, varbase_core-9.1.37, varbase_core-9.0.85

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

Comments

Ahmad Khader created an issue. See original summary.

ahmad khader’s picture

ahmad khader’s picture

rajab natshah’s picture

Status: Needs review » Needs work

Thanks, Ahmad, for reporting and patching.
As we had a discussion about this issue internally:

  • Please, provide a merge request ( About issue forks )
  • Change the logic, from removing to wrapping with Try/Catch
  • Changing the format of custom Varbase's Drush command, could be in a new issue. ( Drupal issue etiquette -- keep code changes specific to the subject of the issue. Create a new issue even if it is about fixing a typo, but do not change other parts of the logic within the same issue. )
rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Needs work » Active

rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.0.0, +varbase_core-10.0.24, +varbase-9.1.4, +varbase_core-9.1.37, +varbase_core-9.0.85
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_core-9.0.85

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_core-9.1.37

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

Ensure a smoother upgrade process.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Issue summary: View changes

✅ Release varbase-10.0.0

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.1.4