From 9ad30214fb24ce1ef2a5187ddf7d7817b3a36909 Mon Sep 17 00:00:00 2001 From: roboquat Date: Wed, 1 Feb 2023 11:01:43 +0000 Subject: [PATCH] [JetBrains] Update IDE images to new build version fix cli endpoint incompatiblities for stable --- WORKSPACE.yaml | 16 ++++++++-------- .../backend-plugin/gradle-stable.properties | 4 ++-- .../gitpod/jetbrains/remote/GitpodCLIService.kt | 12 +++++++++++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml index 12c46b87252138..6a1b43c4d30f1e 100644 --- a/WORKSPACE.yaml +++ b/WORKSPACE.yaml @@ -11,14 +11,14 @@ defaultArgs: codeVersion: 1.75.0 codeQuality: stable noVerifyJBPlugin: false - intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2022.3.1.tar.gz" - golandDownloadUrl: "https://download.jetbrains.com/go/goland-2022.3.1.tar.gz" - pycharmDownloadUrl: "https://download.jetbrains.com/python/pycharm-professional-2022.3.1.tar.gz" - phpstormDownloadUrl: "https://download.jetbrains.com/webide/PhpStorm-2022.3.1.tar.gz" - rubymineDownloadUrl: "https://download.jetbrains.com/ruby/RubyMine-2022.3.1.tar.gz" - webstormDownloadUrl: "https://download.jetbrains.com/webstorm/WebStorm-2022.3.1.tar.gz" - riderDownloadUrl: "https://download.jetbrains.com/rider/JetBrains.Rider-2022.3.1.tar.gz" - clionDownloadUrl: "https://download.jetbrains.com/cpp/CLion-2022.3.1.tar.gz" + intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2022.3.2.tar.gz" + golandDownloadUrl: "https://download.jetbrains.com/go/goland-2022.3.2.tar.gz" + pycharmDownloadUrl: "https://download.jetbrains.com/python/pycharm-professional-2022.3.2.tar.gz" + phpstormDownloadUrl: "https://download.jetbrains.com/webide/PhpStorm-2022.3.2.tar.gz" + rubymineDownloadUrl: "https://download.jetbrains.com/ruby/RubyMine-2022.3.2.tar.gz" + webstormDownloadUrl: "https://download.jetbrains.com/webstorm/WebStorm-2022.3.2.tar.gz" + riderDownloadUrl: "https://download.jetbrains.com/rider/JetBrains.Rider-2022.3.2.tar.gz" + clionDownloadUrl: "https://download.jetbrains.com/cpp/CLion-2022.3.2.tar.gz" jbBackendVersion: "latest" REPLICATED_API_TOKEN: "" REPLICATED_APP: "" diff --git a/components/ide/jetbrains/backend-plugin/gradle-stable.properties b/components/ide/jetbrains/backend-plugin/gradle-stable.properties index 0ab2292c4ac3f5..f44f79d787717a 100644 --- a/components/ide/jetbrains/backend-plugin/gradle-stable.properties +++ b/components/ide/jetbrains/backend-plugin/gradle-stable.properties @@ -1,9 +1,9 @@ # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild=223.8617 +pluginSinceBuild=223.6160 pluginUntilBuild=223.* # Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl # See https://jb.gg/intellij-platform-builds-list for available build versions. pluginVerifierIdeVersions=2022.3 # Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots -platformVersion=223.8617-EAP-CANDIDATE-SNAPSHOT +platformVersion=223.6160-EAP-CANDIDATE-SNAPSHOT diff --git a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodCLIService.kt b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodCLIService.kt index 2654a65517503b..268b336bec4242 100644 --- a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodCLIService.kt +++ b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodCLIService.kt @@ -6,6 +6,7 @@ package io.gitpod.jetbrains.remote import com.intellij.codeWithMe.ClientId import com.intellij.ide.BrowserUtil +import com.intellij.ide.CliResult import com.intellij.ide.CommandLineProcessor import com.intellij.openapi.client.ClientSession import com.intellij.openapi.client.ClientSessionsManager @@ -27,12 +28,14 @@ import io.netty.handler.codec.http.FullHttpRequest import io.netty.handler.codec.http.QueryStringDecoder import io.prometheus.client.exporter.common.TextFormat import kotlinx.coroutines.* +import kotlinx.coroutines.future.asDeferred import org.jetbrains.ide.RestService import org.jetbrains.io.response import java.io.OutputStreamWriter import java.nio.file.InvalidPathException import java.nio.file.Path import java.util.* +import java.util.concurrent.CompletableFuture @Suppress("UnstableApiUsage", "OPT_IN_USAGE") class GitpodCLIService : RestService() { @@ -67,7 +70,14 @@ class GitpodCLIService : RestService() { val file = parseFilePath(fileStr) ?: return "invalid file" val shouldWait = getBooleanParameter("wait", urlDecoder) return withClient(request, context) { - CommandLineProcessor.doOpenFileOrProject(file, shouldWait).future.await() + val f = CommandLineProcessor.doOpenFileOrProject(file, shouldWait).future + val d = if (f is Deferred<*>) + f // latest + else if (f is CompletableFuture<*>) + f.asDeferred() // stable + else + throw IllegalStateException("unexpected") + d.await() } } if (operation == "preview") {