Skip to content
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

[jetbrains] apply vmoptions while installing plugins #13205

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Sep 22, 2022

Description

A user should be able to apply vmoptions to configure different proxies and custom repositories to install plugins in restricted networks or to bring proprietary plugins.

Related Issue(s)

Internal discussion [1]

How to test

Release Notes

JetBrains: VM options to install plugins

It allows to configure custom repositories [[1](https://plugins.jetbrains.com/docs/intellij/custom-plugin-repository.html)] or java proxy settings [[2](https://www.jetbrains.com/help/idea/settings-http-proxy.html)] before starting IDE backend, i.e.
``yaml
jetbrains:
  intellij:
    # proxy and custom repositories configurations 
    vmoptions: '-Dhttp.proxyHost=webcache.example.com -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts="localhost|host.example.com" -Didea.plugin.hosts="http://plugins.example.com:8080/updatePlugins.xml"'
    plugins:
      - org.toml.lang, 
      - com.intellij.kubernetes
      # plugin id from a custom plugin repository
      - localPluginId
``

One also configure IDE vmoptions in the docker image, like:
``bash
INTELLIJ_VMOPTIONS=-Dhttp.proxyHost=webcache.example.com -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts="localhost|host.example.com" -Didea.plugin.hosts="http://plugins.example.com:8080/updatePlugins.xml"
``

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide
  • /werft with-large-vm

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-ak-plugins-vmoptions.2 because the annotations in the pull request description changed
(with .werft/ from main)

@akosyakov
Copy link
Member Author

akosyakov commented Sep 22, 2022

/werft run

👍 started the job as gitpod-build-ak-plugins-vmoptions.3
(with .werft/ from main)

@andreafalzetti
Copy link
Contributor

@akosyakov when I start a workspace the browser opens this URL https://ak-plugins-vmoptions.preview.gitpod-dev.com/api/oauth/authorize?client_id=jetbrains-gateway-gitpod-plugin&redirect_uri=http://127.0.0.1:63343/api/gitpod/oauth/authorization_code&scope=function:getGitpodTokenScopes function:getIDEOptions function:getOwnerToken function:getWorkspace function:getWorkspaces function:listenForWorkspaceInstanceUpdates resource:default&response_type=code&code_challenge=SaEJ5T5Tewzmioy72CsfVzCJpX0tgDTdBZafUR26NtA&code_challenge_method=S256

but I see this error in the browser, instead of the usual redirect to the IDE:

{
  "error": "Error: Handshake inactivity timeout\nStack: Error: Handshake inactivity timeout\n    at Handshake.<anonymous> (/app/node_modules/mysql/lib/protocol/Protocol.js:160:17)\n    at Handshake.emit (node:events:390:28)\n    at Handshake.emit (node:domain:475:12)\n    at Handshake._onTimeout (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)\n    at Timer._onTimeout (/app/node_modules/mysql/lib/protocol/Timer.js:32:23)\n    at listOnTimeout (node:internal/timers:557:17)\n    at processTimers (node:internal/timers:500:7)\n    --------------------\n    at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n    at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n    at PoolConnection.connect (/app/node_modules/mysql/lib/Connection.js:116:18)\n    at Pool.getConnection (/app/node_modules/mysql/lib/Pool.js:48:16)\n    at Pool.releaseConnection (/app/node_modules/mysql/lib/Pool.js:157:10)\n    at Pool._removeConnection (/app/node_modules/mysql/lib/Pool.js:277:8)\n    at Pool._purgeConnection (/app/node_modules/mysql/lib/Pool.js:258:8)\n    at Handshake.onConnect (/app/node_modules/mysql/lib/Pool.js:57:14)\n    at Handshake.<anonymous> (/app/node_modules/mysql/lib/Connection.js:526:10)\n    at Handshake._callback (/app/node_modules/mysql/lib/Connection.js:488:16)\n    at Handshake.Sequence.end (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)\n    at /app/node_modules/mysql/lib/protocol/Protocol.js:404:18\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/mysql/lib/protocol/Protocol.js:403:13\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"
}

@akosyakov
Copy link
Member Author

It seems prev envs are down. I'm trying to recreate them.

@akosyakov
Copy link
Member Author

akosyakov commented Sep 22, 2022

/werft run with-clean-slate-deployment with-large-vm

👍 started the job as gitpod-build-ak-plugins-vmoptions.4
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-ak-plugins-vmoptions.5 because the annotations in the pull request description changed
(with .werft/ from main)

@andreafalzetti
Copy link
Contributor

andreafalzetti commented Sep 22, 2022

/werft run with-clean-slate-deployment with-large-vm

👍 started the job as gitpod-build-ak-plugins-vmoptions.4 (with .werft/ from main)

gif

Copy link
Contributor

@andreafalzetti andreafalzetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected.

Screenshot 2022-09-22 at 18 47 36

@roboquat roboquat merged commit 8e2d030 into main Sep 22, 2022
@roboquat roboquat deleted the ak/plugins_vmoptions branch September 22, 2022 17:48
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Sep 23, 2022
@subinamathew
Copy link

Good one guys!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production editor: jetbrains release-note size/S team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants