github-action-locks icon indicating copy to clipboard operation
github-action-locks copied to clipboard

With 2 parallel runs of a job, run2 of job unlocks the lock created by run1 of job

Open bparthas21 opened this issue 4 years ago • 1 comments

In your example, with a timeout=1 (minute) and sleep=120 (seconds) and doing 3 runs of the same job, below is what happens

  • run1 sets the lock
  • run1 goes into 2 min sleep
  • run2 tries to get lock for 1 min
  • run2 fails to "set" lock but the post-entrypoint releases the lock set by run1
  • run3 can now set the lock even though run1 has not completed

Is there a way to get around this problem?

bparthas21 avatar Aug 21 '21 18:08 bparthas21

Are these 3 runs happening within the same workflow? Or is it 3 different workflow executions happening at the same time?

abatilo avatar Sep 04 '21 14:09 abatilo