cloud-code-intellij icon indicating copy to clipboard operation
cloud-code-intellij copied to clipboard

Support JetBrain Client (JetBrain Gateway for remote development)

Open zarinfam opened this issue 2 years ago • 10 comments

Expected Behavior

Cloud Code plugin works on JetBrains Client (JetBrain Gateway for remote development) as it works on IntelliJ!

Actual Behavior

You can install the plugin and configure run configuration, but you can not run or debug the project!

Additional Information

  • IDE type (e.g. IntelliJ, Pycharm): JetBrain Client (JetBrain Gateway for remote development)
  • IDE version: JetBrains Client 2022.3.1
  • Cloud Code version (Settings > Plugins > Cloud Code): 22.12.2-222
  • Cloud SDK (Settings > Cloud Code > Cloud SDK)
    • Are you allowing the plugin to manage the Cloud SDK: Yes
    • Version of the Cloud SDK: ---
  • Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): 2.0.4
  • Operating System: Ubuntu Server 22.04

zarinfam avatar Jan 07 '23 19:01 zarinfam

Hi, thanks for reporting this! Can you please also provide your remote host IDE version and your local/remote OS? Thanks!

Cloud Code supports JetBrains Gateway using Cloud Workstations (https://cloud.google.com/workstations/docs/develop-remotely-with-jetbrains-ides) Please feel free to try it out too.

ruomengz avatar Jan 09 '23 16:01 ruomengz

@ruomengz If I understood correctly, My remote host IDE is an Ubuntu Server 22.04, which I connect to using ssh (JetBrain Gateway), and my local machine is a Mac.

zarinfam avatar Jan 10 '23 14:01 zarinfam

but you can not run or debug the project

Hi @zarinfam could you elaborate one what exactly you are seeing? Not being able to debug is actually a known current limitation due to the way the UI is streamed from the backend IDE (we will be working on it). But "run" using the Cloud Code run configurations should be working when connected via Gateway.

etanshaul avatar Jan 10 '23 15:01 etanshaul

My remote host IDE is an Ubuntu Server 22.04

Sorry I missed this part. Though this should still work per my previous comment, the team has validated mainly using Cloud Workstations as a backend host.

Info on Cloud Workstations: https://cloud.google.com/workstations Info on connecting to CW from Gateway: https://cloud.google.com/workstations/docs/develop-remotely-with-jetbrains-ides

etanshaul avatar Jan 10 '23 15:01 etanshaul

@etanshaul I have created a Cloud Code: Kubernetes run configuration. When I press the run button, nothing happens. (I am sure my skaffold configuration is correct because this project works perfectly locally)

zarinfam avatar Jan 10 '23 19:01 zarinfam

yeah - we discussed this internally and realized that there is a gap here - we have specialized logic to support the gateway use case, but it is only being enabled on Cloud Workstations backends; since you are not using Cloud Workstations this logic isn't being triggered. Will keep this open for tracking. Thanks.

In the meantime, as a hack, you can try setting an environment variable on your Ubuntu server:

GOOGLE_CLOUD_WORKSTATIONS=true

This will trick the plugin into thinking its running on Cloud Workstations and apply the shims. You'll probably need to restart the IDE backend after setting this env var.

etanshaul avatar Jan 10 '23 20:01 etanshaul

@etanshaul Unfortunately, it did not help. I set this environment variable in the system and the run config setting, but it did not work.

zarinfam avatar Jan 10 '23 21:01 zarinfam

@zarinfam too bad. But just to confirm - you did set this env var on the Ubuntu server machine (where you are running the backend IDE)? (it needs to be on the backend machine, not where the client IDE is running).

Otherwise, we'll discuss to see when we can get to this, and update.

etanshaul avatar Jan 11 '23 15:01 etanshaul

@zarinfam too bad. But just to confirm - you did set this env var on the Ubuntu server machine (where you are running the backend IDE)? (it needs to be on the backend machine, not where the client IDE is running).

Otherwise, we'll discuss to see when we can get to this, and update.

Yes, I did set this env var on the Ubuntu server machine (where IDE backend run)

zarinfam avatar Jan 11 '23 18:01 zarinfam

@zarinfam when you say you cannot run or debug the project - could you explain a bit more on this? You run configuration and nothing happens or something else? Maybe a small screencast would be amazing

ivanporty avatar Jan 24 '23 23:01 ivanporty