SSH Java Run Target sends files even on no local changes

已回答

I'm using a run target to my remote vm via ssh. I have it set up using rsync and java 8 on the dev vm. It seems to work correctly, however, every time I run/debug, this happens during build:

 

Set up batch uploading volume file:///Applications/IntelliJ IDEA.app/Contents ==> ssh://172..../home/{usr}/{path} for paths
plugins/gradle/lib
lib
Set up uploading volume file:///Users/{path} ==> ssh://172..../home/{usr}/{path}
/usr/local/bin/rsync -zarv -e "ssh -p 22 " --files-from=...

Followed by a bunch of ssh logins, "sending incremental file list", and stats/\.

This happens whether there are numerous or no changes. The process takes ~1/2mins every time and makes testing small changes fairly annoying. Is this the expected behavior? Is it possible to enable some sort of diff checking so all the files don't get sent every time?

评论操作 固定链接

Please report at https://youtrack.jetbrains.com/newIssue?project=IDEA with the sample project/steps to reproduce and the logs via Help | Collect Logs and Diagnostic Data.

Please also add "#com.jetbrains.plugins.webDeployment" in Help | Diagnostic Tools | Debug Log Settings before reproducing the problem and collecting the logs.

0
评论操作 固定链接

It seems to me that this might be expected behavior, so I didn't want to open an issue. But If you think I should go ahead and do that anyways I can.

0
评论操作 固定链接

Akram Weheba 11 Did you end up opening an issue I can follow? Same thing is happening to me

0
评论操作 固定链接

IDE needs to make sure the files on the remote are in sync with the project files, so it runs rsync. rsync should be really fast if there are no changes. It's not clear why it's taking so long. Logs/sample project to reproduce/etc may help to understand the problem better. Feel free to open a ticket in YouTrack.

0
评论操作 固定链接

Thanks for answering Serge Baranov

What was happening here:

It was the first time and I did not know better, so I used the `Classpath folder` option in additional settings of Java Configuration of the remote.

With this option IDEA runs rsync separately for each dependency and source/resource folder.

Into the same destination.

With `--delete` option.

So every rsync run deletes everything uploaded before and only the last upload is left.

That's why all the dependencies and most of the project were uploaded every time.

I did not realize it first since I was just running a simple example with couple of print statements to test it, not using any dependencies, which just happened to be in the last uploaded module.

Here is an open issue about it https://youtrack.jetbrains.com/issue/IDEA-279627/Rsync-SSH-Run-Target.-Data-is-not-fully-loaded-to-the-target-due-to-delete-flag but it does not look like it will get any attention.

It is not clear what this `Classpath folder` option is for and how to use it anyway.

 

I have experienced almost every issue from the bug tracker. Found and posted a workaround for my main problem. Opened a new issue.

But after a week it seems that I finally have it working. 

Thanks again!

0

请先登录再写评论。