Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Remove reliance on rsync #11

Open
nhooyr opened this issue Apr 20, 2019 · 20 comments
Open

Remove reliance on rsync #11

nhooyr opened this issue Apr 20, 2019 · 20 comments
Labels
feature New feature or improvement to functionality

Comments

@nhooyr
Copy link
Contributor

nhooyr commented Apr 20, 2019

Right now we require rsync on the remote server.

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 20, 2019

(gcp vm's do not have rsync by default)

@ammario
Copy link
Member

ammario commented Apr 20, 2019

How else would this work?

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 20, 2019

Not sure, just would be nice to have no deps by default. Maybe we use one of the Go rsync libs?

@ammario
Copy link
Member

ammario commented Apr 20, 2019

That seems reasonable.. we don't need the advanced features of rsync that necessitate a remote binary.

Curious about how slow it woukd be to read all those remote modtimes/file sizes over SSH .

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 20, 2019

What if instead of rsync, we just mounted the local extensions folder?

@ammario
Copy link
Member

ammario commented Apr 20, 2019

Avg folder is 300MB and VS Code does a full scan of it on startup

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 20, 2019

In that case, I think requiring rsync to be installed for syncing is fair. Users who do not have it can use --skipsync and we can clarify the error message to indicate that.

@Belval
Copy link

Belval commented Apr 23, 2019

FYI: Even with -skipsync, the connection will fail if the server does not have rsync.

@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 23, 2019

@Belval can you post the error you're getting? I just looked at the code again, rsync is never executed on the remote site if -skipsync is passed.

@Belval
Copy link

Belval commented Apr 23, 2019

I don't have my laptop right now, but it was something along the lines of rsync not found.

EDIT: I'll reply when I have the actual message.

nhooyr added a commit that referenced this issue Apr 23, 2019
@nhooyr
Copy link
Contributor Author

nhooyr commented Apr 23, 2019

Thanks, found and fixed.

@ammario ammario added the feature New feature or improvement to functionality label Apr 23, 2019
@nhooyr
Copy link
Contributor Author

nhooyr commented Sep 25, 2019

Should be able to integrate mutagen here at some point to avoid using rsync.

See https://github.com/mutagen-io/mutagen/blob/cd6f4e1a5e68979668abfb22174c32d877e46000/cmd/mutagen/daemon/main.go

@nhooyr nhooyr changed the title work without rsync on remote server Remove reliance on rsync Nov 22, 2019
@nhooyr
Copy link
Contributor Author

nhooyr commented May 4, 2020

@ammario I know you recently worked with it so how was mutagen's API?

@ammario
Copy link
Member

ammario commented May 4, 2020

Didn't interface directly with Mutagen's API, but the architecture requires that the user has all the mutagen agents locally (it uploads the mutagen agent as the first step in the sync) which introduces its own complexity.

cc @havoc-io correct me if wrong.

@Merith-TK
Copy link
Contributor

Merith-TK commented May 4, 2020 via email

@ammario
Copy link
Member

ammario commented May 4, 2020

@Merith-TK https://mutagen.io/ ... And please don't work on anything without an in depth design consensus with @nhooyr. We want to make sure you're as productive as possible.

@Merith-TK
Copy link
Contributor

Merith-TK commented May 4, 2020 via email

@xenoscopic
Copy link

@ammario In theory, you can avoid needing Mutagen's agent binaries locally if one is preinstalled at the expected location in the target ($HOME/.mutagen/agents/x.y.z/mutagen-agent, where x.y.z is the Mutagen client version). Mutagen will try to execute an existing agent first before injecting one, so you could potentially avoid the injection step and the agent bundle dependency. But Mutagen currently expects an exact version match because the internal protocol isn't stable across versions1, so it will attempt to inject a matching version if none is present. If you're going to vendor/version-lock the Mutagen version that you ship, you might be able to use this strategy to skip the injection step.

If you do need to carry around the agent bundle locally, you can slim it down to only include the required agents (probably just linux/amd64 in your case). The archive just contains a bunch of binaries named <GOOS>_<GOARCH>, so a simple script can prune these and save a lot of space.


1 Actually it is stable across minor release series, but a full version match, including the patch component and any -tag suffix is still required. This may change as the protocol further stabilizes.

@Merith-TK
Copy link
Contributor

Merith-TK commented May 4, 2020 via email

@Merith-TK
Copy link
Contributor

also in theory, incorperating mutagen should be as easy as replacing rsync function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or improvement to functionality
Projects
None yet
Development

No branches or pull requests

5 participants