Skip to content

Compatibility with Magento Cloud #12

@kbalazy-creatuity

Description

@kbalazy-creatuity

In the latest version (1.3.2), a cache.xml file has been added which adds cache and is to the problem on Magento Cloud.
When setup:upgrade is executed, the files from generated/staticcache are deleted and generated. This is not executable on Magento Cloud, and we get an error during deployment.

INFO: Running setup upgrade.
INFO: Set flag: var/.deploy_is_failed
ERROR: [126] The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade --keep-generated --ansi --no-interaction -vvv | tee -a /app/xxxxxxxx_stg/var/log/install_upgrade.log"" failed. Cache types config flushed successfully
  Warning: unlink(/app/xxxxxxxx_stg/generated/staticcache/global_primary_adminhtml_compiled_plugins.php): Read-only file system in /app/xxxxxxxx_stg/vendor/creatuity/magento2-interceptors/Generator/FileCache.php on line 121
INFO: Set flag: var/.deploy_is_failed
  W: 
  W: In Processor.php line 129:
  W:                                                                                
  W:   The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade  
  W:    --keep-generated --ansi --no-interaction -vvv | tee -a /app/xxxxxxxx_  
  W:   stg/var/log/install_upgrade.log"" failed. Cache types config flushed s  
  W:   uccessfully                                                             
  W:   Warning: unlink(/app/xxxxxxxx_stg/generated/staticcache/global  
  W:   _primary_adminhtml_compiled_plugins.php): Read-only file system in /app/xxxxxxxx  
  W:   _stg/vendor/creatuity/magento2-interceptors/Generator/FileCache.p  
  W:   hp on line 121                                                       
  W:                                                                                
  W: 
  W: In InstallUpdate.php line 100:
  W:                                                                                
  W:   The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade  
  W:    --keep-generated --ansi --no-interaction -vvv | tee -a /app/xxxxxxxx_  
  W:   stg/var/log/install_upgrade.log"" failed. Cache types config flushed s  
  W:   uccessfully                                                             
  W:   Warning: unlink(/app/xxxxxxxx_stg/generated/staticcache/global  
  W:   _primary_adminhtml_compiled_plugins.php): Read-only file system in /app/xxxxxxxx  
  W:   _stg/vendor/creatuity/magento2-interceptors/Generator/FileCache.p  
  W:   hp on line 121                                                       
  W:                                                                                
  W: 
  W: In Setup.php line 58:
  W:                                                                                
  W:   The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade  
  W:    --keep-generated --ansi --no-interaction -vvv | tee -a /app/xxxxxxxx_  
  W:   stg/var/log/install_upgrade.log"" failed. Cache types config flushed s  
  W:   uccessfully                                                             
  W:   Warning: unlink(/app/xxxxxxxx_stg/generated/staticcache/global  
  W:   _primary_adminhtml_compiled_plugins.php): Read-only file system in /app/xxxxxxxx  
  W:   _stg/vendor/creatuity/magento2-interceptors/Generator/FileCache.p  
  W:   hp on line 121                                                       
  W:                                                                                
  W: 
  W: In Shell.php line 86:
  W:                                                                                
  W:   The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade  
  W:    --keep-generated --ansi --no-interaction -vvv | tee -a /app/xxxxxxxx_  
  W:   stg/var/log/install_upgrade.log"" failed. Cache types config flushed s  
  W:   uccessfully                                                             
  W:   Warning: unlink(/app/xxxxxxxx_stg/generated/staticcache/global  
  W:   _primary_adminhtml_compiled_plugins.php): Read-only file system in /app/xxxxxxxx  
  W:   _stg/vendor/creatuity/magento2-interceptors/Generator/FileCache.p  
  W:   hp on line 121                                                       
  W:                                                                                
  W: 
  W: deploy
  W: 
  E: Failed to run deploy hook
  E: Command '['sudo', '-u', 'xxxxxxxx_stg', 'bash', '-c', '/etc/platform/xxxxxxxx_stg/post_deploy.sh']' returned non-zero exit status 126
  Exiting maintenance mode

On cloud when running setup:upgrade, the generated directory is only available in read-only and there is no way to change this. The application when deploying performs compilation every time, and with older versions it worked without an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions