jigish.addweb created an issue. See original summary.
@jigishaddweb
Thank you for the refactoring. The patch looks good, but I found db_drop_table() is depreciated in openstack.install. Could you please also refactor them?
db_drop_table()
openstack.install
I found the following warning and error while running drush updb -y
drush updb -y
// Do you wish to run the specified pending updates?: yes.
> [notice] Update started: k8s_update_8264 > [notice] Update completed: k8s_update_8264 > [notice] Update started: k8s_update_8265 > [notice] Update completed: k8s_update_8265 > [notice] Update started: k8s_update_8266 > [notice] Update completed: k8s_update_8266 > [notice] Update started: k8s_update_8267 > [notice] Update completed: k8s_update_8267 > [notice] Update started: k8s_update_8268 > [notice] Update completed: k8s_update_8268 > [notice] Update started: k8s_update_8269 > [notice] Update completed: k8s_update_8269 > [notice] Update started: k8s_update_8270 > [notice] Update completed: k8s_update_8270 > [notice] Update started: k8s_update_8271 > [notice] Update completed: k8s_update_8271 > [notice] Update started: k8s_update_8272 > [notice] Update completed: k8s_update_8272 > [notice] Update started: aws_cloud_update_8197 > [notice] Update completed: aws_cloud_update_8197 > [notice] Update started: aws_cloud_update_8198 > [notice] Update completed: aws_cloud_update_8198 > [notice] Update started: aws_cloud_update_8199 > [notice] Update completed: aws_cloud_update_8199 > [notice] Update started: aws_cloud_update_8200 > [notice] Update completed: aws_cloud_update_8200 > [notice] Update started: aws_cloud_update_8201 > [notice] Update completed: aws_cloud_update_8201 > [notice] Update started: aws_cloud_update_8202 > [notice] Update completed: aws_cloud_update_8202 > [notice] Update started: aws_cloud_update_8203 > [notice] Update completed: aws_cloud_update_8203 > [notice] Update started: aws_cloud_update_8204 > [notice] Update completed: aws_cloud_update_8204 > [notice] Update started: aws_cloud_update_8205 > [notice] Update completed: aws_cloud_update_8205 > [notice] Update started: aws_cloud_update_8206 > [notice] Update completed: aws_cloud_update_8206 > [notice] Update started: aws_cloud_update_8207 > [notice] Update completed: aws_cloud_update_8207 > [notice] Update started: aws_cloud_update_8208 > [notice] Update completed: aws_cloud_update_8208 > [notice] Update started: cloud_update_8127 > [notice] Update completed: cloud_update_8127 > [notice] Update started: cloud_update_8128 > [notice] Update completed: cloud_update_8128 > [notice] Update started: k8s_update_8273 > [notice] Update completed: k8s_update_8273 > [notice] Update started: cloud_update_8129 > [notice] Update completed: cloud_update_8129 > [notice] Update started: openstack_update_8202 > [warning] file_get_contents(/var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/config/install/views.view.openstack_cloud_instance.yml): failed to open stream: No such file or directory cloud.module:327 > [notice] Update completed: openstack_update_8202 > [notice] Update started: cloud_update_8130 > [notice] Update completed: cloud_update_8130 > [notice] Update started: openstack_update_8203 > [error] The "openstack_cloud_image" entity type does not exist. > [error] Update failed: openstack_update_8203 > [notice] Update started: k8s_update_8274 > [notice] Update completed: k8s_update_8274 > [notice] Update started: cloud_update_8131 > [notice] Update completed: cloud_update_8131 > [notice] Update started: aws_cloud_update_8209 > [notice] Update completed: aws_cloud_update_8209 > [notice] Update started: aws_cloud_update_8210 > [notice] Update completed: aws_cloud_update_8210 > [notice] Update started: aws_cloud_update_8211 > [notice] Update completed: aws_cloud_update_8211 > [notice] Update started: aws_cloud_update_8212 > [notice] Update completed: aws_cloud_update_8212 > [notice] Update started: aws_cloud_update_8213 > [notice] Update completed: aws_cloud_update_8213 > [notice] Update started: aws_cloud_update_8214 > [notice] Update completed: aws_cloud_update_8214 > [notice] Update started: aws_cloud_update_8215 > [notice] Update completed: aws_cloud_update_8215 > [notice] Update started: aws_cloud_update_8216 > [notice] Update completed: aws_cloud_update_8216 > [notice] Update started: aws_cloud_update_8217 > [notice] Update completed: aws_cloud_update_8217 > [notice] Update started: aws_cloud_update_8218 > [notice] Update completed: aws_cloud_update_8218 > [notice] Update started: aws_cloud_update_8219 > [notice] Update completed: aws_cloud_update_8219 > [notice] Update started: system_update_8901 > [notice] Update completed: system_update_8901 [error] Update aborted by: openstack_update_8203 [error] Finished performing updates.
@yas
Thank you for reviewing the patch.
I refactored db_drop_table() function and fixed warning.
Please test updated patch.
Thanks
Thank you for fixing it. It looks beautiful, but could you please fix the following coding violation?
$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md /var/www/html/web/modules/contrib/cloud/ FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/openstack.install --------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------- 415 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found --------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------
One more thing, could you please move the following code in between openstack_uninstall and openstack_update_8201?
openstack_uninstall
openstack_update_8201
/** * Add entity type. */ function openstack_add_entity_type($entity_id) { // Add entity type. $definition_update_manager = \Drupal::entityDefinitionUpdateManager(); $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_id); $definition_update_manager->uninstallEntityType($entity_type); $definition_update_manager->installEntityType($entity_type); } /** * Drop database table. */ function openstack_drop_db_table($tables) { $schema = Database::getConnection()->schema(); foreach($tables as $table) { $schema->dropTable($table); } }
Fixed coding standard violations and moved the above code.
Please test new patch.
Thank you for fixing and the refactoring. It looks good to me now. I'll merge the patch to 8.x-1.x and 8.x-2.x and close this issue as Fixed.
8.x-1.x
8.x-2.x
Fixed
Issue #3121336 by jigish.addweb, yas: Refactor OpenStack image listing
Automatically closed - issue fixed for 2 weeks with no activity.
Comments
Comment #2
jigish.addweb commentedComment #3
yas@jigishaddweb
Thank you for the refactoring. The patch looks good, but I found
db_drop_table()is depreciated inopenstack.install. Could you please also refactor them?Comment #4
yasComment #5
yas@jigishaddweb
I found the following warning and error while running
drush updb -y// Do you wish to run the specified pending updates?: yes.
Comment #6
jigish.addweb commented@yas
Thank you for reviewing the patch.
I refactored
db_drop_table()function and fixed warning.Please test updated patch.
Thanks
Comment #7
yas@jigishaddweb
Thank you for fixing it. It looks beautiful, but could you please fix the following coding violation?
Comment #8
yas@jigishaddweb
One more thing, could you please move the following code in between
openstack_uninstallandopenstack_update_8201?Comment #9
jigish.addweb commented@yas
Fixed coding standard violations and moved the above code.
Please test new patch.
Thanks
Comment #10
yas@jigishaddweb
Thank you for fixing and the refactoring. It looks good to me now. I'll merge the patch to
8.x-1.xand8.x-2.xand close this issue asFixed.Comment #13
yas