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:
- Prepare the terraform code change which implements your namespace change.
- 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:
- Raise your PR, and approve it when it is merged.
- After your change has completed successfully, raise another PR to remove the
Skip “live-1” environments during migration
When you migrate your namespace environment to “live”, a file called
MIGRATED_SKIP_APPLY_THIS_NAMESPACE is added to your namespace repository in live-1, this will allow the Apply Pipelines to skip individual namespaces in “live-1”, to avoid resource conflicts during migration.