Closed 0xC0DEBA5E closed 2 years ago
Hi, I'll take a look what is wrong here
My plugin uses JB Git Integration APIs to invoke the fetch, they use CLI git to do it. Looking at that code it is possible to cancel the operation in several point in time but the moment git fetch
command is invoked it has to run till completion - there is no way to cancel it.
Ok, thank you for having a look at this. As this is just a little annoyance for me in some situations I think this issue can be closed now. Thanks.
I'm working with a Git repo that is accessible only via VPN.
When I forget to connect to my VPN before issuing a command that triggers a git fetch in my IDE, then I have to wait until the Git fetch background tasks runs into the timeout. It seems to me like the cancel button on the Git fetch operation just hides the message and in the background the network request to the unreachable IP-Address is not stopped. For the next Git fetch operation after connecting to the VPN I always have to wait until this hidden background task is being killed by the timeout. Otherwise the new operation will also hang.
This only happens when the Git ToolBox plugin is enabled.
To Reproduce Steps to reproduce the behavior:
With some further testing I found out that this seems to happen only in a very few cases. I believe you have to use an IP instead of a hostname for the git repo url, otherwise the failing name resolution will stop the fetch process at an earlier stage. But maybe the fix to this problem solves a problem for someone else too, so I wanted to share my observations.
Expected behavior It should be possible to really stop the background git fetch process. If the plugin is disabled, this seems to work.
Plugin version 212.8.5
IDE version PhpStorm 2021.3.2 Build #PS-213.6777.58, built on January 31, 2022 Runtime version: 11.0.13+7-b1751.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.15.16-200.fc35.x86_64 GC: G1 Young Generation, G1 Old Generation Memory: 8384M Cores: 8 Registry: debugger.watches.in.variables=false run.processes.with.pty=TRUE ide.balloon.shadow.size=0 js.debugger.webconsole=false
Non-Bundled Plugins: org.jetbrains.plugins.go-template (213.6777.8) net.sjrx.intellij.plugins.systemdunitfiles (0.3.4) net.seesharpsoft.intellij.plugins.csv (2.18.2) com.thvardhan.gradianto (4.4) com.intellij.ideolog (203.0.27.0) com.intellij.properties (213.6461.46) com.github.b3er.idea.plugins.arc.browser (0.23) com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.13.0) YAML/Ansible support (0.11.2) zielu.gittoolbox (212.8.5) mobi.hsz.idea.gitignore (4.3.0) com.jetbrains.plugins.jade (213.5744.223) intellij.prettierJS (213.6461.6) com.dmarcotte.handlebars (213.5744.190) com.intellij.kubernetes (213.6777.8) ru.adelf.idea.dotenv (2022.1)
Current Desktop: GNOME
Screenshots I used the following button to cancel the fetch:![image](https://user-images.githubusercontent.com/4631945/153197404-433f6904-1eaf-498c-bf26-1bfb2c423249.png)
This will appear after approx. 2mins, when the background process runs into the timeout.![image](https://user-images.githubusercontent.com/4631945/153197595-feb2f622-e408-4053-9b0b-c8ebc72192f2.png)