Approx Reading Time: 2 minutes
Let's consider a scenario where there are two users working within Project 1, and Environment A has already been deployed. Both users attempt to make changes to Environment A and deploy it again. What would happen in this case?
Code Pipes incorporates locking and queuing features to handle concurrent changes to the Terraform state within a project. The behavior in the given scenario can be summarized as follows:
If the first user's environment deploy job is in progress, Code Pipes will wait until it completes before starting the second user's deploy job. This ensures that changes are validated and applied in a sequential manner.
In the event that the first job is waiting for admin approval (in the PENDING state), the second job will be blocked. Code Pipes will only proceed with validating and applying the second user's changes after the first user's changes have been approved.
If the first job fails, the second job will start without any dependencies on the first job. This allows the second user's changes to proceed independently.
By implementing these locking and queuing mechanisms, Code Pipes ensures that changes to the Terraform state are executed in an orderly manner, preventing conflicts and maintaining the integrity of the deployment process.
Note: For more detailed information on the job approval flow, please refer to the approval-flow.
Updated 3 months ago