I was going through the documentation in buildkite-agent lock v3 | Buildkite Documentation and I couldn’t tell if the lock can persist across builds irrespective of agent process. Request to clarify.
Hi @abhandage and Welcome to Buildkite!
Locks in Buildkite are tied to the agent that creates them, meaning they don’t persist across builds or agent restarts. If a job acquires a lock on one agent and that agent stops or a different agent picks up the next build, the lock is gone. So no, locks can’t carry over between builds, regardless of agent processes.
1 Like
thanks for the reply, is there a feature in buildkite that can achieve what I am looking for i.e. acquire locks and persist it across builds unless released ?
Hey! No, we don’t have a built-in feature specifically for acquiring locks and persisting them across builds. Can you expand in your use case and what you are trying to do? maybe there are some alternatives we can suggest