sequential deployments when using exclusive lock checks

Let's say you would like to ensure that you pipeline operates in a sequential manner - lockBehaviour option- sequential in a sense that if user A trigger pipeline at 12:00 and then another user B trigger pipeline at 12:01, user B will have to wait until user A completes. 

If user a cancel it, User B will have to wait until the cancellation completes. This can take a while before next pipeline start executing. 

There are 2 option available - sequential and runLatest.



stages:
- stage: A
  lockBehavior: sequential
  jobs:
  - job: Job
    steps:
    - script: Hey!

If we do not specify, lockBehaviour is runLatest.

Potential issue :-

  • Queued runs waiting on a check can eventually time out, so B could fail if it waits too long behind other runs.
  • Only runs targeting the same protected resource (for example, the same environment, repository, agent pool, service connection) compete for the lock.



Comments

Popular posts from this blog

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

llama cpp running it in google colab