-
Notifications
You must be signed in to change notification settings - Fork 27
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
Consolidation of winrm-transport into winrm-fs #28
Conversation
As things stand now, this code is passing all functional winrm tests. Things that need to happen here:
Once the above is done and this is released, Test-Kitchen and Train should be adjusted to use this gem and winrm-transport can be depricated. |
@mwrock This is exciting to see finally happen, nice job!
|
@sneal I think its using the logging library now and I don't see a reason to change that. Maybe you are seeing the commented lines where I was directing the logging to stdout which I'll definitely clean out and maybe I missed some stray I personally prefer the default rubocop interpolation rules and was gonna cleanup style before release. |
I have validated that both Test-Kitchen (with some slight rewiring) and Vagrant work when pointed to this branch. However, one finding this turned up is that winrm-fs copies as src/* -> dest while winrm-transport is src -> dest. (actually I think I remember seeing this in November when I did the initial merge and forgot about it). Ultimately I think winrm-transport's strategy is the correct one since it is the same strategy as I also did some benchmarking. I benchmarked this branch against master and winrm-transport. I used the test-kitchen repo as a directory to copy. Its total size (including .git folder) is 6.6MB and 1578 files. Over several iterations, the times were nearly identical among the three tests (~25s). This branch was about a half second slower before I made a change to avoid an initial round trip to create the winrm-upload directory. A couple interesting findings:
I noticed that master does not actually use the shell zip factory so I'm gonna keep that out. So that completes items 1 - 3 listed above. |
I think I'd rather see us make a breaking change to the copy behavior we want. The sooner we do it the easier it'll be. We can always add the shell zip factory in later if we need it, but zipping is still a lot faster than the file transfer. |
Yeah I was going back and forth on breaking earlier. I think you are right. It will likely mean chaning vagrant to adapt but I'm guessing that will be straight forward. |
I have rebased this PR with current master. Here is an updated todo list:
|
1 - 3 above are complete. |
a4c8ede
to
743a378
Compare
I've removed WIP from the title of this pr and its ready for comment. I'll squash it before it gets merged. I've tested against test-kitchen and it works with some tweaks that I will submit after this is merged. I am curious @sneal if you could suggest a good test case for vagrant. I have lightly pursued its usage there and it seems like vagrant only copies files, not directories or am I wrong.I'm hoping that the changes here will be non breaking for vagrant. |
I took another pass through the vagrant code that touches The good thing is that now the It looks like all other provisioners (at least those that ship inside of vagrant) are completely unafected since they either only copy files or they delete the target directory before the copy. I think this is an acceptable change as long as vagrant makes clear mention of this in its release doc which I'll make sure to submit promptly after this is released. @sneal let me know if you are comfortable with this PR (no rush) and I'll release. Thanks! |
WRT Vagrant, it should be fine as long as the file provisioner works. Vagrant typically shares files out from the host rather than uploading them. I do wonder if the changes will affect the https://github.com/Cimpress-MCP/vagrant-winrm-syncedfolders plugin. I've used that for spinning up AWS Windows instances from Vagrant before. All that being said, I think we can |
cool. I have overlayed latest winrm/winrm-fs into a vagrant omnibus and the file provisioner is working.I'll give the syncedfolders a whirl before merging. Thanks! |
… array of sources and adopt directory copy behavior more similar to SCP
Consolidation of winrm-transport into winrm-fs
This is a work in progress of a merging of the winrm-transport gem into winrm-fs. See test-kitchen/winrm-transport#16
Both gems set out to solve the same problem and both have strengths and weaknesses. This PR aims to remove the maintenance of 2 codebases and merge the best of both.