NCIOCPL / cgov-digital-platform

The Cancer.gov Digital Communications Platform
GNU General Public License v2.0
11 stars 33 forks source link

Enabler: Update Drupal to 9.4.0 #3267

Closed bryanpizzillo closed 2 years ago

bryanpizzillo commented 2 years ago

Update Drupal to 9.4.0

ESTIMATE TBD

This needs to be started by April 2022 as 9.4.0 will be out June 2022. However the sooner the better. This may end up having a connection to updating BLT if they add 9.3.0 as a required dependency. (#3187) IF IT IS NOT a dependency that I strongly urge this to be handled by itself.

blairlearn commented 2 years ago
composer cgov-clean && composer install
composer remove drupal/core --no-update # It's redundant with the require for drupal/core-recommended.
#
# Edit composer.json to remove patch for "3048464 : SubProcess migrate...."
#
composer require drupal/core-recommended:~9.4.0 drupal/core-composer-scaffold:~9.4.0 --update-with-all-dependencies
composer require drupal/core-dev:~9.4.0 --dev --update-with-all-dependencies
composer require drush/drush:^10.6.2 drupal/migrate_tools:^5.1.0 --update-with-all-dependencies
composer update --with acquia/blt:12.8.2 # Avoid going to -dev
#
# Docker up, 
# In the local container
#
drush --include=docroot/modules/contrib/acsf/acsf_init acsf-init
blairlearn commented 2 years ago

Renaming the ticket to say 9.4.0 since it's out and there are already important notes on this one.

blairlearn commented 2 years ago

Packages upgraded for Core

drupal/core-composer-scaffold (9.2.16 => 9.4.2) symfony/polyfill-ctype (v1.23.0 => v1.25.0) symfony/yaml (v4.4.25 => v4.4.43) symfony/polyfill-php72 (v1.25.0 => v1.26.0) symfony/polyfill-mbstring (v1.23.0 => v1.25.0) twig/twig (v2.14.11 => v2.15.1) symfony/deprecation-contracts (v2.4.0 => v2.5.2) psr/container (1.1.1 => 1.1.2) symfony/service-contracts (v2.4.0 => v2.5.2) symfony/polyfill-php80 (v1.23.0 => v1.25.0) symfony/polyfill-php73 (v1.25.0 => v1.26.0) symfony/console (v4.4.25 => v4.4.43) symfony/polyfill-php81 (v1.25.0 => v1.26.0) symfony/process (v4.4.25 => v4.4.41) symfony/finder (v4.4.37 => v4.4.41) symfony/polyfill-intl-normalizer (v1.23.0 => v1.25.0) symfony/polyfill-intl-idn (v1.23.0 => v1.25.0) guzzlehttp/psr7 (1.8.5 => 1.9.0) guzzlehttp/promises (1.4.1 => 1.5.1) guzzlehttp/guzzle (6.5.5 => 6.5.8) webmozart/assert (1.10.0 => 1.11.0) symfony/var-dumper (v5.3.0 => v5.4.9) symfony/event-dispatcher-contracts (v1.1.9 => v1.1.13) symfony/event-dispatcher (v4.4.25 => v4.4.42) nikic/php-parser (v4.13.2 => v4.14.0) composer/semver (3.2.5 => 3.3.2) typo3/phar-stream-wrapper (v3.1.6 => v3.1.7) symfony/translation-contracts (v2.4.0 => v2.5.2) symfony/validator (v4.4.25 => v4.4.43) symfony/translation (v4.4.25 => v4.4.41) symfony/serializer (v4.4.35 => v4.4.43) symfony/routing (v4.4.25 => v4.4.41) symfony/mime (v5.3.0 => v5.4.10) symfony/http-foundation (v4.4.25 => v4.4.43) symfony/psr-http-message-bridge (v2.1.0 => v2.1.2) symfony/polyfill-iconv (v1.23.0 => v1.25.0) symfony/http-client-contracts (v2.4.0 => v2.5.2) symfony/debug (v4.4.25 => v4.4.41) symfony/error-handler (v4.4.25 => v4.4.41) symfony/http-kernel (v4.4.25 => v4.4.43) symfony/dependency-injection (v4.4.25 => v4.4.43) symfony-cmf/routing (2.3.3 => 2.3.4) pear/pear-core-minimal (v1.10.10 => v1.10.11) masterminds/html5 (2.7.4 => 2.7.5) laminas/laminas-stdlib (3.3.1 => 3.7.1) laminas/laminas-escaper (2.7.0 => 2.9.0) laminas/laminas-feed (2.14.1 => 2.17.0) laminas/laminas-diactoros (2.6.0 => 2.11.3) doctrine/lexer (1.2.1 => 1.2.3) egulias/email-validator (2.1.25 => 3.2.1) doctrine/annotations (1.13.1 => 1.13.3) doctrine/reflection (1.2.2 => 1.2.3) symfony/dom-crawler (v4.4.39 => v4.4.42) sebastian/environment (5.1.3 => 5.1.4) phpdocumentor/type-resolver (1.6.0 => 1.6.1) phpunit/phpunit (9.5.19 => 9.5.21) doctrine/cache (1.12.1 => 1.13.0)

blairlearn commented 2 years ago

Dependency Packages updated

cweagans/composer-patches (1.7.1 => 1.7.2) drupal/core-composer-scaffold (9.2.16 => 9.2.21) acquia/acsf-tools (dev-9.x-dev 0a2b871 => dev-9.x-dev 496a145) zumba/amplitude-php (1.0.2 => 1.0.5) symfony/polyfill-php72 (v1.25.0 => v1.26.0) symfony/polyfill-php73 (v1.25.0 => v1.26.0) symfony/polyfill-php81 (v1.25.0 => v1.26.0) symfony/filesystem (v4.4.39 => v4.4.42) symfony/config (v4.4.37 => v4.4.42) grasmash/yaml-cli (2.0.1 => 2.0.2) symfony/finder (v4.4.37 => v4.4.41) guzzlehttp/guzzle (6.5.5 => 6.5.7) enlightn/security-checker (v1.9.0 => v1.10.0) webmozart/assert (1.10.0 => 1.11.0) nikic/php-parser (v4.13.2 => v4.14.0) psy/psysh (v0.10.9 => v0.11.7) consolidation/site-alias (3.1.1 => 3.1.5) consolidation/site-process (4.1.0 => 4.2.0) consolidation/output-formatters (4.1.2 => 4.2.2) consolidation/log (2.0.2 => 2.1.1) consolidation/annotated-command (4.4.0 => 4.5.6) drush/drush (10.3.6 => 10.6.1) drupal/core (9.2.16 => 9.2.21) acquia/drupal-environment-detector (v1.4.0 => 1.4.1) drupal/acsf (2.69.0 => 2.72.0) drupal/acsf_variables (2.69.0 => 2.72.0) drupal/acsf_theme (2.69.0 => 2.72.0) drupal/acsf_duplication (2.69.0 => 2.72.0) behat/behat (v3.10.0 => v3.11.0) symfony/dom-crawler (v4.4.39 => v4.4.42) drupal/drupal-driver (v2.1.1 => v2.2.0) instaclick/php-webdriver (1.4.10 => 1.4.14) behat/mink-selenium2-driver (dev-master 3c3da51 => dev-master 5d15043) drupal/drupal-extension (v4.1.0 => v4.2.1) textalk/websocket (1.5.7 => 1.5.8) acquia/blt-behat (v1.1.1 => v1.3.0) symfony/phpunit-bridge (v5.4.3 => v5.4.10) symfony/lock (v4.4.38 => v4.4.40) sebastian/environment (5.1.3 => 5.1.4) phpdocumentor/type-resolver (1.6.0 => 1.6.1) phpunit/phpunit (9.5.19 => 9.5.21) justinrainbow/json-schema (5.2.11 => 5.2.12) squizlabs/php_codesniffer (3.6.2 => 3.7.1) phpstan/phpdoc-parser (1.2.0 => 1.6.4) slevomat/coding-standard (7.0.19 => 7.2.1) drupal/coder (8.3.14 => 8.3.15): Checking out 0cfad3a21f from cache seld/jsonlint (1.8.3 => 1.9.0) composer/xdebug-handler (2.0.5 => 3.0.3) composer/spdx-licenses (1.5.6 => 1.5.7) composer/ca-bundle (1.3.1 => 1.3.2) composer/composer (2.2.9 => 2.2.16) drupal/core-dev (9.2.16 => 9.2.21) acquia/coding-standards (v0.7.0 => v1.0.0) simplesamlphp/simplesamlphp (v1.18.8 => v1.18.9) simplesamlphp/simplesamlphp-module-sqlauth (v0.9.3 => v0.9.4) simplesamlphp/simplesamlphp-module-smartattributes (v0.9.1 => v0.9.2) simplesamlphp/simplesamlphp-module-radius (v0.9.3 => v0.9.4) simplesamlphp/simplesamlphp-module-preprodwarning (v0.9.2 => v0.9.3) simplesamlphp/simplesamlphp-module-ldap (v0.9.12 => v0.9.17) simplesamlphp/simplesamlphp-module-negotiate (v0.9.11 => v0.9.12) simplesamlphp/simplesamlphp-module-metarefresh (v0.9.6 => v0.9.7) simplesamlphp/simplesamlphp-module-memcachemonitor (v0.9.2 => v0.9.3) simplesamlphp/simplesamlphp-module-expirycheck (v0.9.3 => v0.9.4) simplesamlphp/simplesamlphp-module-consent (v0.9.7 => v0.9.8) simplesamlphp/simplesamlphp-module-consentadmin (v0.9.1 => v0.9.2) simplesamlphp/simplesamlphp-module-cdc (v0.9.1 => v0.9.2) simplesamlphp/simplesamlphp-module-authyubikey (v0.9.1 => v0.9.3) simplesamlphp/simplesamlphp-module-authx509 (v0.9.8 => v0.9.9) simplesamlphp/simplesamlphp-module-authtwitter (v0.9.1 => v0.9.3) simplesamlphp/simplesamlphp-module-authorize (v0.9.3 => v0.9.4) simplesamlphp/simplesamlphp-module-authcrypt (v0.9.3 => v0.9.4) simplesamlphp/simplesamlphp-module-adfs (v0.9.8 => v0.9.9) simplesamlphp/saml2 (v4.2.4 => v4.6.3) phpmailer/phpmailer (v6.5.1 => v6.6.3) gettext/languages (2.8.1 => 2.9.0) gettext/gettext (v4.8.5 => v4.8.6) dflydev/placeholder-resolver (v1.0.2 => v1.0.3) doctrine/cache (1.12.1 => 1.13.0) commerceguys/addressing (v1.2.1 => v1.3.0) drupal/address (1.9.0 => 1.10.0) drupal/admin_toolbar (3.0.3 => 3.1.0) monolog/monolog (1.26.1 => 1.27.1) league/climate (3.7.0 => 3.8.2) drupal/console (1.9.7 => 1.9.8) drupal/core-recommended (9.2.16 => 9.2.21) drupal/devel (4.1.1 => 4.1.5) drupal/entity_browser (2.6.0 => 2.7.0) drupal/embed (1.4.0 => 1.5.0) drupal/crop (2.1.0 => 2.2.0) fileeye/mimemap (1.2.0 => 1.2.2) drupal/sophron (1.1.0 => 1.2.0) phenx/php-font-lib (0.5.2 => 0.5.4) lsolesen/pel (0.9.10 => 0.9.12) drupal/file_mdm (2.1.0 => 2.4.0) drupal/imagemagick (3.2.0 => 3.3.0) drupal/token (1.9.0 => 1.10.0) drupal/metatag (1.16.0 => 1.19.0) drupal/migrate_file (2.0.0 => 2.1.1) drupal/migrate_plus (5.1.0 => 5.3.0) drupal/migrate_tools (5.0.0 => 5.1.0) drupal/moderation_sidebar (1.4.0 => 1.5.0) drupal/ctools (3.7.0 => 3.8.0) drupal/paragraphs (1.12.0 => 1.14.0) drupal/pathauto (1.8.0 => 1.10.0) drupal/redirect (1.6.0 => 1.7.0) drupal/role_delegation (1.1.0 => 1.2.0) drupal/shield (1.4.0 => 1.6.0) drupal/simple_sitemap (3.10.0 => 3.11.0) drupal/token_filter (1.3.0 => 1.4.0) phpstan/phpstan (0.12.99 => 1.8.0) phpstan/phpstan-deprecation-rules (0.12.6 => 1.0.0) nette/neon (v3.2.2 => v3.3.3) mglaman/phpstan-drupal (0.12.15 => 1.1.21) mglaman/drupal-check (1.1.10 => 1.4.0) vlucas/phpdotenv (v2.6.8 => v2.6.9)

blairlearn commented 2 years ago

Update attempts so far:

Update drupal/core and all other packages.

Problems encountered:

Update only drupal/core

Used wget --mirror -e robots=off to simulate traffic.

Cannot duplicate errors on locally nor on acsf dev.

Update only dependent packages (not `drupal/core')

Additional tests now break.

Used wget --mirror -e robots=off to simulate traffic.

Cannot duplicate errors on locally nor on acsf dev.

Update to drupal/core 9.4.2

Used wget --mirror -e robots=off to simulate traffic.

Cannot duplicate errors locally nor on acsf dev.

The previously added image_loading property is now marked as removed. 🙄

bryanpizzillo commented 2 years ago

Just logging the Update hooks that ran for JUST the drupal update

root@4a16a693334c:/var/www# drush updb
 ---------- ------------------- --------------- ------------------------------- 
  Module     Update ID           Type            Description                    
 ---------- ------------------- --------------- ------------------------------- 
  user       9301                hook_update_n   9301 - Change the users table  
                                                 to use an serial uid field.    
  block      replace_node_type   post-update     Updates the node type          
             _condition                          visibility condition.          
  ckeditor   omit_settings_for   post-update     Updates Text Editors using     
             _disabled_plugins                   CKEditor 4 to omit settings    
                                                 for disabled plugins.          
  image      image_loading_att   post-update     Add the image loading          
             ribute                              attribute setting to image     
                                                 field formatter instances.     
  media      modify_base_field   post-update     Updates stale references to    
             _author_override                    Drupal\media\Entity\Media::ge  
                                                 tCurrentUserId.                
  node       modify_base_field   post-update     Updates stale references to    
             _author_override                    Drupal\node\Entity\Node::getC  
                                                 urrentUserId.                  
  node       rebuild_node_revi   post-update     Rebuild the node revision      
             sion_routes                         routes.                        
  system     delete_authorize_   post-update     Remove obsolete                
             settings                            system.authorize               
                                                 configuration.                 
  system     enable_provider_d   post-update     Enable the modules that are    
             atabase_driver                      providing the listed database  
                                                 drivers.                       
  system     sort_all_config     post-update     Sort all configuration         
                                                 according to its schema.       
  taxonomy   clear_views_argum   post-update     Clear the cache after          
             ent_validator_plu                   deprecating Term views         
             gins_cache                          argument validator.            
  user       update_roles        post-update     Calculate role dependencies    
                                                 and remove non-existent        
                                                 permissions.                   
  views      image_lazy_load     post-update     Add lazy load options to all   
                                                 image type field               
                                                 configurations.                
  views      provide_revision_   post-update     Clear caches due to adding a   
             table_relationshi                   relationship from revision     
             p                                   table to base table.           
  views      sort_identifier     post-update     Add the identifier option to   
                                                 all sort handler               
                                                 configurations.                
 ---------- ------------------- --------------- ------------------------------- 

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

>  [notice] Update started: user_update_9301
>  [notice] Update completed: user_update_9301
>  [notice] Update started: block_post_update_replace_node_type_condition
>  [notice] Update completed: block_post_update_replace_node_type_condition
>  [notice] Update started: ckeditor_post_update_omit_settings_for_disabled_plugins
>  [notice] Update completed: ckeditor_post_update_omit_settings_for_disabled_plugins
>  [notice] Update started: image_post_update_image_loading_attribute
>  [notice] Update completed: image_post_update_image_loading_attribute
>  [notice] Update started: media_post_update_modify_base_field_author_override
>  [notice] Update completed: media_post_update_modify_base_field_author_override
>  [notice] Update started: node_post_update_modify_base_field_author_override
>  [notice] Update completed: node_post_update_modify_base_field_author_override
>  [notice] Update started: node_post_update_rebuild_node_revision_routes
>  [notice] Update completed: node_post_update_rebuild_node_revision_routes
>  [notice] Update started: system_post_update_delete_authorize_settings
>  [notice] Update completed: system_post_update_delete_authorize_settings
>  [notice] Update started: system_post_update_enable_provider_database_driver
>  [notice] Update completed: system_post_update_enable_provider_database_driver
>  [notice] Update started: system_post_update_sort_all_config
>  [notice] Update completed: system_post_update_sort_all_config
>  [notice] Update started: taxonomy_post_update_clear_views_argument_validator_plugins_cache
>  [notice] Update completed: taxonomy_post_update_clear_views_argument_validator_plugins_cache
>  [notice] Update started: user_post_update_update_roles
>  [notice] The role Content Author has had the following non-existent permission(s) removed: edit content translations.
>  [notice] The role Site Admin has had the following non-existent permission(s) removed: administer adobe dynamic tag management.
>  [notice] The roles Content Author, Site Admin have had non-existent permissions removed. Check the logs for details.
>  [notice] Update completed: user_post_update_update_roles
>  [notice] Update started: views_post_update_image_lazy_load
>  [notice] Update completed: views_post_update_image_lazy_load
>  [notice] Update started: views_post_update_provide_revision_table_relationship
>  [notice] Update completed: views_post_update_provide_revision_table_relationship
>  [notice] Update started: views_post_update_sort_identifier
>  [notice] Update completed: views_post_update_sort_identifier
>  [warning] No configuration objects have been updated.
 [success] Finished performing updates.