Description
In our Gitlab CI pipelines (internal, can't provide much details), we are invoking stack many times simultaneusly (build with different params, stack path
etc.). And we are using the built-in docker integration (all commands thus start stack --docker
. (We also have two different images we use, also simultaneusly, but that probably isn't related. Haven't tested that much.)
In this scenario, some stack
commands fail with
SQLite3 returned ErrorBusy while attempting to perform step
Without knowing much about stack internals I suspect $STACK_ROOT/.stack/docker.db
that it is failing to interact with when run in parallel.
This is annoying because as it causes pipelines to fail randomly.
Yes this looks like it's more a limitation resulting from using sqlite for tracking docker container state (or whatever that is used for). But maybe there's a way around it?
Steps to reproduce
Invoke multiple stack --docker
commands simultaneusly, some of them should fail.
Expected
I expected stack to work just fine with parallel execution even when using docker integration.
Actual
Some (usually, just one) stack commands fail immediately with
SQLite3 returned ErrorBusy while attempting to perform step.
Stack version
$ stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1
Method of installation
stack upgrade