Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Best strategy for multi-project builds? #53

Open
rtyley opened this issue Sep 11, 2019 · 0 comments
Open

Best strategy for multi-project builds? #53

rtyley opened this issue Sep 11, 2019 · 0 comments

Comments

@rtyley
Copy link

rtyley commented Sep 11, 2019

I can see from #16 & #17 that users are using sbt-dynamodb in multi-project builds, and it looks like the strategy there is to use a different port for each subproject, starting a new instance of DynamoDBLocal with each one.

I wasn't aware of that strategy, and actually have a multi-project build with two subprojects both using sbt-dynamodb on the same port - this seemed to work up until we started an upgrade to sbt 1.3, which seems to be running the tests for those two subprojects concurrently (nice and fast!), and unfortunately sometimes failing when the first subproject to finish kills off the DynamoDBLocal process before the second project has finished.

Although I could adopt the multi-port strategy (Scanamo didn't make this convenient until v1.0.0-M11 with scanamo/scanamo#507), I'd be interested to know if a single-DynamoDBLocal-instance strategy would be possible - which would presumably be more lightweight for the build-server and faster to run. You'd only want the DynamoDBLocal service to start if a subproject required it, but only kill it as the entire sbt build came to an end?

rtyley added a commit to rtyley/scanamo that referenced this issue Sep 12, 2019
This is useful for multi-project builds that have some subprojects with
tests that require LocalDynamoDB, and others that don't - the two
subprojects will need different ports to not interfere with each other
(not killing each other's LocalDynamoDB process before time). This problem
seemed to rear it's head in the Ophan build as we tried to upgrade to
sbt 1.3.

See also localytics/sbt-dynamodb#53 and the
alternative strategy used in Scanamo itself: scanamo#232
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant