Skip to content

Make use of Drupal's deployment identifier

In some rare scenarios, we have an issue after deployment, e.g. when a service declaration has changed, that the Symfony container doesn't get rebuilt, and we need to truncate the cache_container table manually to get the site to refresh.

Most likely, the use of the deployment identifier could resolve this issue:

/**
 * Deployment identifier.
 *
 * Drupal's dependency injection container will be automatically invalidated and
 * rebuilt when the Drupal core version changes. When updating contributed or
 * custom code that changes the container, changing this identifier will also
 * allow the container to be invalidated as soon as code is deployed.
 */
# $settings['deployment_identifier'] = \Drupal::VERSION;

Source: https://git.drupalcode.org/project/drupal/-/blob/81e9500d67f5af084b2f34a84fff9acc94d94944/sites/default/default.settings.php#L287-295

As we tag our Drupal projects before deployment, we could use that tag as the identifier so that we always get a valid container for updated sites.

Edited by jurgenhaas
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information