Skip to content

Refactor the Gitpod Server Launcher [Follow-up from #11232] #11291

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

Closed
felladrin opened this issue Jul 11, 2022 · 0 comments · Fixed by #11307
Closed

Refactor the Gitpod Server Launcher [Follow-up from #11232] #11291

felladrin opened this issue Jul 11, 2022 · 0 comments · Fixed by #11307

Comments

@felladrin
Copy link
Contributor

felladrin commented Jul 11, 2022

To fix the issue about JetBrains IDEs not signaling heartbeats, we've brought back code from a previous implementation. Now that we confirmed the problem is fixed, we need to refactor the solution to avoid duplicated code and ensure it's covering all connection cases.

Also, we need to make backend-plugin work the same way as gateway-plugin regarding proxies. See below:

launcher.listen(
info.gitpodApi.endpoint,
info.gitpodHost,
plugin.pluginId.idString,
plugin.version,
tokenResponse.token
)

val origin = "https://$gitpodHost/"
val proxies = CommonProxy.getInstance().select(URL(origin))
val sslContext = CertificateManager.getInstance().sslContext
// see https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003146180/comments/360000376240
Thread.currentThread().contextClassLoader = GitpodConnectionProvider::class.java.classLoader
launcher.listen(
"wss://$gitpodHost/api/v1",
origin,
plugin.pluginId.idString,
plugin.version,
accessToken,
proxies,
sslContext
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
1 participant