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 external volume #860

Merged
merged 16 commits into from
Sep 11, 2024
Merged

Conversation

dimitri
Copy link
Owner

@dimitri dimitri commented Aug 2, 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 self-assigned this Aug 2, 2024
@dimitri dimitri modified the milestones: v0.17, v0.18 Aug 2, 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.
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.
This runs an interactive docker container (bash) with the volume mounted for
exploration / debug / inspect.
@dimitri dimitri force-pushed the fix/docker-compose-external-volume branch from 6d43b08 to 80bc34b Compare September 11, 2024 13:46
@dimitri dimitri merged commit 38b2c8f into main Sep 11, 2024
20 checks passed
@dimitri dimitri deleted the fix/docker-compose-external-volume branch September 11, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant