- Notifications
You must be signed in to change notification settings - Fork1
fix: remote ide no longer reconnects after plugin upgrade#167
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
When the plugin is upgraded while JBClient is connected to a remote dev server via the Coder SSH proxy/tunnel,the upgrade process kills and re-establishes the SSH connection. However, JBClient/Toolbox fails to detect the restoredconnection and reports "Toolbox: Target environment com.coder.toolbox:bobiverse-bob.dev not found" error.While digging into the Toolbox bytecode—specifically ClientOverSshTunnelConnector—I realized the issue likely stemsfrom an incorrect equals implementation in our custom SSH connection info object. In short, when a plugin upgrade terminatesthe SSH tunnel, the connector’s monitoring logic correctly detects the lost connection and waits. But when the SSH connectionis re-established, the monitoring logic fails to recognize it as a valid replacement, because equals is still using thedefault Object#equals rather than a proper value-based implementation.Unfortunately, I wasn’t able to properly test this—specifically, upgrading from a version without the fix to one that includesit—because all Toolbox marketplace feeds are signed, preventing us from using a tool like mitmproxy to serve a locally modifiedplugin version. Given that, I propose releasing the change first and then performing the upgrade test to confirm the fix.
I also requested a review/opinion from JetBrains on this matter. Ideally this should be tested before merging. |
code-asher approved these changesAug 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Interesting, that makes a lot of sense!
6d509d6
intomain 6 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
When the plugin is upgraded while JBClient is connected to a remote dev server via the Coder SSH proxy/tunnel, the upgrade process kills and re-establishes the SSH connection. However, JBClient/Toolbox fails to detect the restored connection and reports "Toolbox: Target environment com.coder.toolbox:bobiverse-bob.dev not found" error.
While digging into the Toolbox bytecode—specifically
ClientOverSshTunnelConnector
— I realized the issue likely stems from an incorrect equals implementation in our custom SSH connection info object. In short, when a plugin upgrade terminates the SSH tunnel, the connector’s monitoring logic correctly detects the lost connection and waits. But when the SSH connection is re-established, the monitoring logic fails to recognize it as a valid replacement, because equals is still using the defaultObject#equals
rather than a proper value-based implementation.Unfortunately, I wasn’t able to properly test this—specifically, upgrading from a version without the fix to one that includes it—because all Toolbox marketplace feeds are signed, preventing us from using a tool like mitmproxy to serve a locally modified plugin version. Given that, I propose releasing the change first and then performing the upgrade test to confirm the fix.