Patch Cloud tools

The ece-tools package contains the following scripts and Magento Commerce (Cloud) commands that automatically perform build and deploy actions of the codebase in your environments:

  • php ./vendor/bin/m2-ece-build
  • php ./vendor/bin/m2-ece-deploy

Versions are specified as 200<major>.<minor>.<patch>.

These updates strictly contain improvements for tools, including build and deploy hooks. These tools are updated as needed through patching and product upgrades; managed by the magento-cloud-metapackage.

v2002.0.11

New features

  • Configuring read-only connections to non-master nodes—This release adds the ability to configure a read-only connection to a non-master node to receive read-only traffic (for Redis and for MariaDB).
  • Configuration Wizard—Added a new wizard to help verify your configuration for static content deployment. See Smart wizards.

  • Symfony Console support—Added support for Symfony Console 4 with Magento 2.3.

  • Cron scheduling optimizations—Improved the queue management and enhanced logging to help with debugging cron-related issues.

Fixed issues

  • Deployment validation fails if an ADMIN_EMAIL or ADMIN_USERNAME value is the same as an existing Magento administrator account.

  • The first installation of the Staging & Production environments of a PRO project now includes different index prefixes for ElasticSearch to prevent possible conflicts while identifying records belonging to each environment.

  • You can now use the VERBOSE_COMMANDS environment variable during both build and deploy phases.

  • Fixed an issue that interrupted the build phase for legacy architecture when using static content deployment.

v2002.0.10

New features

  • Static Content Deployment (SCD)—There is a new, alternative deployment process to generate static content when requested (on-demand). This decreases downtime and improves cache handling by generating the most critical assets.

    • New environment variable—Added the new SCD_ON_DEMAND global environment variable to generate static content when requested.

    • Post-deploy hook—Added a new post_deploy hook for the .magento.app.yaml file that clears the cache and pre-loads (warms) the cache after the container begins accepting connections. It is available only for Pro projects that contain Staging and Production environments in the Project Web UI and for Starter projects. Although not required, this works in tandem with the SCD_ON_DEMAND environment variable.

  • Optimization—Optimized moving or copying files during deployment to improve deployment speed and decrease loads on the file system.

  • Deployment Logging—Added the ability to enable Syslog and Graylog Extended Log Format (GELF) handlers for outputting logs during the deployment process. See Logging handlers.

  • Added the following new Environment variables:
    • CRYPT_KEY—Provide a cryptographic key to another environment when moving a database.

    • SKIP_HTML_MINIFICATIONGlobal environment variable that skips copying the static view files in the var/view_preprocessed directory and generates minified HTML when requested.

    • SCD_ON_DEMANDGlobal environment variable to generate static content when requested.

    • WARM_UP_PAGES—You can list the pages to use to pre-load the cache. Available in the new Post-deploy variables.

Fixed issues

  • We fixed an issue that involved a locally applied patch breaking the deployment on an instance. Now, ECE-Tools can detect that a patch has been applied.

  • Fixed a conflict between JavaScript bundling and GZIP functionality. Now these features work correctly together.

  • Fixed an issue that caused ece-tools CLI commands to fail when using earlier PHP 7.0.x versions.

  • Fixed a Redis session locking issue that caused an Admin login delay. Also, the fix is available for 2.1.x.

v2002.0.9

You must upgrade the Magento Commerce (Cloud) metapackage to get this and all future updates.

New features

  • ece-tools—The ece-tools package now supports Magento 2.1.x. You must upgrade to ece-tools to use these features.

  • Redis configuration—You can now configure Redis page and default cache and Redis session storage using an environment variable.

  • Search, AMQP, and Redis service improvements—We unified the service configuration flow so that it now behaves the same way for all services. Manually editing the env.php file to configure services is no longer supported. You must use environment variables or the .magento.env.yaml file instead.

  • Environment variables

    • The use of env:STATIC_CONTENT_THREADS was deprecated and will be removed in a future release. Use the STATIC_CONTENT_THREADS environment variable instead.

    • The STATIC_CONTENT_EXCLUDE_THEMES environment variable was deprecated. You must use the SCD_EXCLUDE_THEMES environment variable instead.

  • Logging—We simplified logging around built-in patching operations.

Fixed issues

  • We removed developer mode support and the APPLICATION_MODE environment variable because they were causing unexpected behavior.

  • We fixed an issue that was causing static content deployment failures related to Redis. Now, multi-threaded static content deployment runs as designed.

  • We fixed an issue that was preventing users from saving modifications to configuration fields in the Admin, which are marked as sensitive after running the app:config:dump command.

  • We added support for an earlier version of symfony/yaml to fix conflicts with some packages, which are not yet compatible with the latest version.

v2002.0.8

We merged vendor/magento/ece-patches with vendor/magento/ece-tools in this release. You no longer need to update the vendor/magento/ece-patches package separately.

New features

  • Improved logging

    • We improved log messaging to provide better explanations when the build or deploy process overrides an environment variable.
    • You can now view installation and upgrade progress in real time. Tail the install_update.log file to view progress. For example,

      tail -f var/log/install_upgrade.log
      
  • New cron command—You can now unlock specific stuck cron jobs instead of stopping and re-launching all of them with the cron:unlock command. Not available in 2.1.

  • Unified configuration file—You can now configure build and deploy stages using a .magento.env.yaml file.

  • Backup configuration files—The deployment process now automatically creates a backup of the app/etc/env.php and app/etc/config.php configuration files after deployment. We also added a new CLI command to restore these configuration files from a backup.

  • Troubleshooting validation errors—We changed the command you must use to resolve validation errors when config.php does not contain enough data for static content deployment. Previously, the error message instructed you to run bin/magento app:config:dump. Now, you must run php ./vendor/bin/ece-tools config:dump.

  • New environment variables—You can now use environment variables to connect custom search and AMQP-based services to your site.

  • We implemented smart patching. Now the package applies patches based not on Magento Commerce (Cloud) version, but on patched package version.

Fixed issues

  • We fixed a logging issue that was causing build errors.

  • We fixed an issue that was causing timeout exceptions when running deployments in interactive mode.

  • We fixed an issue that was causing errors when using the compact strategy for static content generation. Not available in 2.1.

  • We fixed an issue that was preventing the deployment script from properly identifying staging and production environments.

  • We fixed an issue that was causing network issues to disrupt database connections and cause failures during the installation and upgrade process.

  • We fixed an issue preventing you from exporting the configuration files using app:config:dump more than once. Not available in 2.1.

  • We fixed a Redis session locking issue that caused an Admin login delay. Not available in 2.1.

  • We fixed an implementation issue related to versioning that was causing a conflict with other Composer-based patching modules.

  • We fixed an issue that was causing PHP memory issues during import.

  • Removed patch; fixing bug in colinmollenhour/credis v1.6 to enable support for Magento Commerce (Cloud) 2.2.1. Not available in 2.1.

v2002.0.7

Fixed issues

  • We removed var/view_preprocessed symlinking to fix an issue that was causing JavaScript minification conflicts.

v2002.0.6

Fixed issues

  • We fixed an issue that was causing gzip errors when a file or directory name contains spaces.

  • We fixed an issue that was preventing deployment scripts from properly recognizing and enabling module dependencies.

v2002.0.5

New features

  • Configure a cron consumer with an environment variable—You can now configure cron consumers using the new CRON_CONSUMERS_RUNNER environment variable.

  • Configuration scanning—We now scan for critical components during the build/deploy process and halt the process if the scan fails, which prevents unnecessary downtime due to the site being in maintenance mode.

  • Build/deploy notifications—We added a new configuration file that you can use to set up Slack and/or email notifications for build/deploy actions in all your environments.

  • Static content compression—We now compress static content using gzip during the build and deploy phases. This compression, coupled with Fastly compression, helps reduce the size of your store and increase deployment speed. If necessary, you can disable compression using a build option or deploy variable. See the following topics for more information:

  • Configuration management—We now auto-generate an app/etc/config.php file in your git repository during the build phase if it doesn’t already exist. The auto-generated file includes only a list of modules and extensions. If the file already exists, the build phase continues as normal. If you follow Configuration Management at a later time, the commands update the file without requiring additional steps. Refer to Deployment process for more information.

  • Database dumps—We added a new magento/ece-tools CLI command for creating database dumps in all environments. For Pro plan Production environments, this command only dumps from one of three high-availability nodes, so production data written to a different node during the dump may not be copied. We recommend putting the application in maintenance mode before doing a database dump in Production environments. See Snapshots and backup management for more information.

  • Cron interval limitations lifted—The default cron interval for all environments provisioned in the us-3, eu-3, and ap-3 regions is 1 minute. The default cron interval in all other regions is 5 minutes for Pro Integration environments and 1 minute for Pro Staging and Production environments. To modify your existing cron jobs, edit your settings in .magento.app.yaml or create a support ticket for Production/Staging environments. Refer to Set up cron jobs for more information.

Fixed issues

  • We fixed an issue that was causing long deploy times due to the deploy process invoking the cache-clean operation before static content deployment.

  • We fixed an issue causing errors during the static content generation step of deployment on Production environments.

  • We fixed an issue preventing some magento/ece-tools commands from logging output to stderr.

  • We fixed an issue preventing base URL values in env.php from being updated in forked branches.

  • We fixed an issue causing the magento setup:install command to add an unsecure prefix (http://) to secure base URLs.

  • We fixed an issue preventing patch errors from causing deployment failures.

  • We fixed an issue preventing ece-tools from halting execution and throwing an exception if no patches can be applied.

  • We fixed an issue causing errors when loading the storefront after enabling HTML minification in the Magento Admin.

v2002.0.4

Fixed issues

v2002.0.3

Fixed issues

  • We fixed an issue that was causing pages to time out because Redis was taking too long to read/write. You can now use the disable_locking parameter in Redis configurations to prevent this issue.

v2002.0.2

Fixed issues

  • The RabbitMQ configuration process now obtains all required parameters automatically.

v2002.0.1

New features

  • Magento Commerce (Cloud) now supports scopes and static content deployment strategies. We have added the –s parameter with a default setting of quick for the static content deployment strategy. You can use the environment variable SCD_STRATEGY to customize and use these strategies with your build and deploy actions. This variable supports the options standard, quick, or compact. If you select compact, we override the STATIC_CONTENT_THREADS value with 1, which can slow deployment, especially in production environments. Not available in 2.1.

  • We have created a new log file on environments to capture and compile build and deploy actions. The file is located in the var/log/cloud.log file inside the Magento root application directory.

Fixed issues

  • Refactored the ece-tools package to make it compatible with Magento Commerce (Cloud) 2.2.0 and higher.

  • We fixed an issue that was preventing ece-tools from halting execution and throwing an exception if no patches can be applied.

  • We fixed an issue that was causing exceptions to be thrown when dependency injection (di) compilation is skipped during builds.

  • We fixed an issue that was causing the deploy process to overwrite custom Redis configurations in the env.php file.

  • We fixed an issue that was causing redirect loops due to disabled by default secure admin.

v2002.0.0

This package is no longer compatible with other versions of Magento Commerce (Cloud) and should not be used.

Initial release

Initial release of ece-tools for Magento Commerce (Cloud) 2.2.0.