Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker-compose volume sharing between services. #847

Closed
wants to merge 10 commits into from

Conversation

dimitri
Copy link
Owner

@dimitri dimitri commented Jul 18, 2024

In unit tests where we use both an inject and a test services, we need the inject service to access the same pgcopydb work directory as the test service. For that we use an external docker volume.

The previous implementation of that idea was found to be wrong, this is fixing it by properly using docker APIs for shared "external" volumes.

@dimitri dimitri added bug Something isn't working Build CI Packaging labels Jul 18, 2024
@dimitri dimitri added this to the v0.17 milestone Jul 18, 2024
@dimitri dimitri self-assigned this Jul 18, 2024
@dimitri dimitri marked this pull request as draft July 18, 2024 11:20
@dimitri dimitri requested a review from hanefi July 19, 2024 13:57
dimitri added 10 commits July 31, 2024 17:55
In unit tests where we use both an inject and a test services, we need the
inject service to access the same pgcopydb work directory as the test
service. For that we use an external docker volume.

The previous implementation of that idea was found to be wrong, this is
fixing it by properly using docker APIs for shared "external" volumes.
The sharing is necessary for the follow-* tests where an inject service is
being used in the background, concurrently to the main test service.
On my local environment docker volume create turned out to not be necessary,
which is good news because we can (and probably want to) keep the volumes
around between test rounds. A cleanup script has even been implemented to
restart fresh.

On GitHub actions, it looks like we might need to first create the docker
volume to then be able to use it. The error message is not very helpful (it
just says: docker-compose: no such file or directory), but it's worth trying
that.
@dimitri dimitri force-pushed the fix/docker-compose-external-volume branch from e444fbd to 5faa108 Compare July 31, 2024 15:55
@dimitri dimitri closed this in #859 Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build CI Packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant