Skip to main content

Long-running environments operations

Some operations on namespaces in the Cloud Platform can take a long time to complete, e.g. upgrading an RDS instance from one version to another.

This means a scheduled apply pipeline run might try to operate on a namespace while it is being modified.

We use Terraform state locking to ensure that this does not cause serious problems, but at the least it would cause the Apply Pipeline to timeout with an error if it can’t acquire a lock on the target namespace’s terraform state.

For this reason, we have a mechanism to allow the Apply Pipeline to skip individual namespaces during long-running operations.

To use this feature:

  1. Prepare the terraform code change which implements your namespace change.
  2. Before raising your PR, include a file called APPLY_PIPELINE_SKIP_THIS_NAMESPACE (this file merely has to exist - its contents are irrelevant).

    The file needs to be in the top-level folder for your namespace, e.g: namespaces/live.cloud-platform.service.justice.gov.uk/mynamespace/APPLY_PIPELINE_SKIP_THIS_NAMESPACE

  3. Raise your PR, and approve it when it is merged.

  4. After your change has completed successfully, raise another PR to remove the APPLY_PIPELINE_SKIP_THIS_NAMESPACE file.

This page was last reviewed on 26 July 2024. It needs to be reviewed again on 26 January 2025 by the page owner #cloud-platform .
This page was set to be reviewed before 26 January 2025 by the page owner #cloud-platform. This might mean the content is out of date.