test: local dev container uses local mount for faster testing #391
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jdcallet brought this up as a good feature to have.
This change allows for usage of
make local-dev
to not require you to clean up your local environment to alter your code and build a new testable copy ofbelt
.You can now instead run
make local-dev
to spin up the SRC/DST DB containers, and yourbelt
container instead buildsbelt
based on the local code you have on your laptop as a volume. Therefore, when you make a code change, you can just runpip install -e .
to update your test container'sbelt
binary instead of rebuilding everything.Note: it is indeed redundant to volume while the container is built with the build-time copy of the
pgbelt
code. I decided against removing that local copy in the Dockerfile to keep our CI steps from not needing to installpoetry
dependencies on each CI step (see theblack
andflake8
steps - they are run using that built container).