-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable StateClients within Docker to connect to destinations (#386
) StateClients open a connection to destinations directly in order to read & persist state. This doesn't work if the source plugin is in a docker container, because docker containers cannot mount sockets (they can mount the files, but the communication doesn't work). This PR makes two simple changes: - Adds the `WithUseTCP` option to the client constructor. If it ends up using `startLocal` (as most plugins do), it will send an `--address` with a free TCP address, rather than the default of a Unix socket. Some code is updated to be consistent with this change. - For Docker registries, it always enables the special extra host `host.docker.internal`, so that the container can address the host's destination connection. There's no good way of asking if the source plugin has a StateClient, so this minimal change will apply to all docker syncs. By itself, this PR shouldn't change anything. I'll open a minimal PR on the cli to leverage this. I've tested a Docker sync (typeform) and a non-Docker sync (aws) with these changes and cli changes and they work fine <img width="1354" alt="Screenshot 2024-08-08 at 12 45 17" src="https://github.com/user-attachments/assets/5b5319c8-b9f6-487d-9713-b007e9486377"> <img width="1353" alt="Screenshot 2024-08-08 at 12 45 49" src="https://github.com/user-attachments/assets/8319b334-e4df-4ea0-b6ec-16fefb85eca7">
- Loading branch information
1 parent
790f62e
commit da98954
Showing
2 changed files
with
90 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters