factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

Error from drush updb does not cause deploy command to fail #165

Closed mikran closed 3 years ago

mikran commented 3 years ago

Recent deployment pipeline finished green even though it had this error from database post-update hook

 -------- ------------------------- ------------- --------------------------- 
  Module   Update ID                 Type          Description                
 -------- ------------------------- ------------- --------------------------- 
  node     glossary_view_published   post-update   Add a published filter to  
                                                   the glossary View.         
 -------- ------------------------- ------------- --------------------------- 
 // Do you wish to run the specified pending updates?: yes.                     
 [warning] PDOStatement::execute(): MySQL server has gone away Statement.php:59
 [warning] PDOStatement::execute(): Error reading result set's header Statement.php:59
In Connection.php line 701:
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT nam  
  e, value FROM {key_value} WHERE collection = :collection; Array              
  (                                                                            
      [:collection] => system.schema                                           
  )                                                                            
In Statement.php line 59:
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away  
updatedb [--cache-clear [CACHE-CLEAR]] [--entity-updates] [--post-updates [POST-UPDATES]] [--no-cache-clear] [--no-post-updates] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify] [--druplicon] [--] <command>
 [success] Cache rebuild complete.
stmh commented 3 years ago

thanks for the report @mikran, this is by intent (and the code involved in this has not changed the last 2 years) as we do have a lot of projects where updb might fail but we do not want to stop the deployment.

Changing this might introduce a lot of burden for existing projects which rely on this behavior.

We can introduce a new configuration-option to be more strict on certain projects.

stmh commented 3 years ago

as the needed changes will break backwards compatibility they will be rolled out with 3.7