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

rsync auto command should not watch excluded folders #3159

Closed
arnaudbreton opened this issue Mar 12, 2014 · 11 comments
Closed

rsync auto command should not watch excluded folders #3159

arnaudbreton opened this issue Mar 12, 2014 · 11 comments

Comments

@arnaudbreton
Copy link

As far as I understand the Vagrant rsync auto command code, it watches the shared folder and subfolders.

The rsync__exclude parameter seems not to be used by this command, it is only used when launching the rsync command.

@mway
Copy link

mway commented Mar 12, 2014

Seems like we could reasonably manage this via Guard's Listener#ignore, although it'd probably be best to use an ignore: [...] share option for rsync folders, which is in turn automatically passed to both rsync and Guard (rsync_auto.rb:67).

@mitchellh
Copy link
Contributor

So this is harder than I expected, because rsync's exclude syntax is pretty advanced. I'm doing my best though to support at least SOME of it.

@mitchellh
Copy link
Contributor

Okay, I got something in that works for most rsync exclude patterns!

@arnaudbreton
Copy link
Author

Thanks @mitchellh for your reactivity! How can we test this new release?

@mitchellh
Copy link
Contributor

1.5.1 will come out shortly.

@arnaudbreton
Copy link
Author

Just tested the 1.5.1.

I still have high-latency between a change and its detection by the watcher even when paths seem correctly ignored:

INFO rsync-auto: Ignoring 6 paths:
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*.git\/)
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*app\/cache)
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*sessions)
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*app\/logs)
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*web)
 INFO rsync-auto:   -- (?-mix:^\/Users\/arnaud\/workspace\/project\/.*node_modules)

I'll stick with my Grunt tasks (https://gist.github.com/arnaudbreton/9517344) for the moment since it detects changes very fast (mainly because it only watches some specified paths).
I'm convinced that moving from a blacklist logic to a whitelist (like grunt-contrib-watch does) will solve the latence issues.

@arnaudbreton
Copy link
Author

Should we re-open this issue @mitchellh?

@mitchellh
Copy link
Contributor

No, beacuse the issue at hand here is fixed well enough, it passes the ignores through. I'm not sure why you're seeing any slowness. The "Listening adapter" is not polling correct? (in the logs)

@arnaudbreton
Copy link
Author

It does, but take a lot of time to detect changes.

@nkezhaya
Copy link

Did this stop working? My excluded folders are definitely triggering rsync calls, and I get a ton of duplicate directory warnings from Guard.

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants