Date:
15 June 2023

The main focus for this month's Melbourne Drupal Meetup was a presentation by Amey Mudras on Drupal automatic updatesExternal Link . Amey started by looking at the problems with manual updates. He then went through automatic updates — what they provide, limitations and how automatic updates are set up/implemented. Automatic updates will soon be a part of Drupal core.

Drupal Automatic Update Initiative: Summary of Amey’s presentation

In this presentation, Amey Mudras discusses the Drupal Automatic Update initiativeExternal Link , addressing the challenges of manual updates, the features and workflow of the automatic update, its limitations, and the future prospects of the module.

Introduction and background

Amey starts by expressing gratitude for the opportunity to present and highlights his interest in the Drupal Automatic Update initiativeExternal Link . This initiative addresses a long-standing demand for an automatic update feature in Drupal. Manual updates are time-consuming and require technical expertise, leading to issues maintaining security updates for Drupal sites.

Challenges with manual updates

Manual updates for Drupal sites are currently complex and time-consuming. Security updates take considerable time, often weeks or even months to complete. Many smaller sites lack the technical knowledge needed for updates, leading to ignored updates. To address these challenges, the Drupal community has taken the initiative to develop an automatic update featureExternal Link .

Introduction to Drupal Automatic Update

The automatic update featureExternal Link is one of the most requested enhancements in Drupal. It offers patch-level updates directly through Drupal Core, enabling easy updates with a single click. It can also detect and report problems during the update process and provides a robust API for customisation. Currently, patch-level updates and experimental features for minor version updates and updating contributed modules and themes are supported.

Automatic update workflow

The automatic update process involves four stages. First, a stage directory is created as a replica of the codebase, which is then copied to a temporary directory. Next, ComposerExternal Link is used to fetch required packages, ensuring that ComposerExternal Link is up-to-date. The packages are saved in the temporary directory. Subsequently, new updates are applied and deployed on the site. Upon successful completion, the stage directory is deleted.

Limitations and future plans

While automatic updatesExternal Link bring significant benefits, there are some limitations. Completely unattended updates are not yet supported, but they are planned for the future. Major version updates and downgrades are also not supported. Additionally, multi-site setups are not currently compatible with the module. However, the features of the automatic update module are expected to be incorporated into Drupal 10 core.

Requirements and setup

For sites to benefit from automatic updates, they should be managed using ComposerExternal Link (version 2.3.5 or later). The site must be capable of modifying its own codebase. Hosting providers like Acquia have started supporting this feature, enabling direct updates on their servers. If direct codebase modification isn't possible, updates can be tested locally before being deployed.

Setting up automatic updates

The process of setting up automatic updatesExternal Link involves requiring and enabling the module. The module can be installed like any other, and after enabling it, users can access the updates tab to check for available security updates. Users can initiate the update process, which includes downloading updates, creating a staging environment, and applying updates to the production site. Notifications for successful updates and error messages are provided.

Customisation and integration

Questions from the audience include inquiries about preventing unwanted module installations, integration with visual regression tests and automation tests, and addressing failures in the update process. Amey acknowledges that some custom coding would be required to integrate additional tests and customise the update process.

Conclusion

The presentation highlights the significance of the Drupal Automatic Update initiativeExternal Link in addressing the challenges posed by manual updates. The automatic update feature aims to streamline patch-level updates and provide a smoother update process for Drupal sites. While there are limitations to the current version of the module, future plans include addressing these limitations and integrating the module's features into Drupal 10 core. The potential for customisation and integration with other processes indicates the module's potential to enhance Drupal site management.