Closed hfinucane closed 7 years ago
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
I'm running Concourse 2.2.1, in case this has anything to do with the Concourse scheduling side.
You may want to put serial: true
on the first job, otherwise a few may queue up and you may have a later job actually acquire the lock. This'll then be skipped by the subsequent jobs and things could get weird.
You could also try setting version: every
on the get: demolock
steps.
serial: true
on the first job seems like it has stabilized it. Should this go into the README as "something you should always set"?
Although from my point of view it seems like every
would maybe be a better solution? Am I just getting accidental every
semantics with serial
because lock acquisitions aren't getting executed out of order?
You definitely don't always need serial: true
as you may have multiple locks and may want to be able to run tests against multiple environments concurrently for example.
version: every
may be the better solution, yeah. But there's a trick to that too, unfortunately: https://github.com/concourse/concourse/issues/736
serial: true
is currently the easiest technique.
Hi there, I'm going to close this as it looks like your question was resolved. Feel free to reopen or to ask on slack or on stackoverflow
I've been doing some testing to make sure that I could use this, but my demonstration tends to grind to a halt and stop working when I leave it alone for too long.
I think that the best way to reproduce it is to prod the "tick" resource so that the builds come down in the wrong order. I've seen "Step 4" remain untriggered, but usually it bails out with
error: lock instance is no longer acquired
while the lock file is still indemo/claimed/
. That said, generally starting it up and going for a coffee is good enough. If I drop theget: tick
step in the "Step 4" plan, it never bails out with an error.