Skip to content

Commit 8de2716

Browse files
authored
Merge pull request #995 from JetBrains/endgame-202410
Merge Endgame 202410
2 parents 81dc9d4 + 013c6b1 commit 8de2716

File tree

91 files changed

+362
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+362
-250
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828

2929
env:
3030
# Branches from the https://github.com/microsoft/azure-maven-plugins and https://github.com/microsoft/azure-tools-for-java repositories
31-
ENDGAME_VERSION: endgame-202408
31+
ENDGAME_VERSION: endgame-202410
3232

3333
jobs:
3434

CHANGELOG.md

Lines changed: 5 additions & 0 deletions

PluginsAndFeatures/AddLibrary/AzureLibraries/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<parent>
2828
<groupId>com.microsoft.azuretools</groupId>
2929
<artifactId>utils</artifactId>
30-
<version>3.92.0</version>
30+
<version>3.93.0</version>
3131
</parent>
3232
<groupId>com.microsoft.azuretools</groupId>
3333
<artifactId>com.microsoft.azuretools.sdk.lib</artifactId>
@@ -39,9 +39,9 @@
3939
</organization>
4040

4141
<properties>
42-
<azuretool.version>3.92.0</azuretool.version>
42+
<azuretool.version>3.93.0</azuretool.version>
4343
<azuretool.sdk.version>3.32.0.qualifier</azuretool.sdk.version>
44-
<azure.toolkit-lib.version>0.48.0</azure.toolkit-lib.version>
44+
<azure.toolkit-lib.version>0.49.0</azure.toolkit-lib.version>
4545
</properties>
4646
<dependencyManagement>
4747
<dependencies>

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ Export-Package: com.microsoft.azuretools.appservice,
4343
com.microsoft.azuretools.appservice.handlers,
4444
com.microsoft.azuretools.appservice.ui
4545
Bundle-ClassPath: .,
46-
target/lib/azure-toolkit-ide-appservice-lib-0.48.0.jar
46+
target/lib/azure-toolkit-ide-appservice-lib-0.49.0.jar

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<dependency>
1414
<groupId>com.microsoft.azure</groupId>
1515
<artifactId>azure-toolkit-ide-appservice-lib</artifactId>
16-
<version>0.48.0</version>
16+
<version>0.49.0</version>
1717
</dependency>
1818
</dependencies>
1919
<repositories>

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.springcloud/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui,
2323
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
2424
Bundle-ActivationPolicy: lazy
2525
Bundle-ClassPath: .,
26-
target/lib/azure-toolkit-ide-springcloud-lib-0.48.0.jar
26+
target/lib/azure-toolkit-ide-springcloud-lib-0.49.0.jar
2727
Import-Package: com.microsoft.azuretools.core.actions,
2828
org.eclipse.core.expressions,
2929
org.eclipse.jface.text.hyperlink,

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.springcloud/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<dependency>
1414
<groupId>com.microsoft.azure</groupId>
1515
<artifactId>azure-toolkit-ide-springcloud-lib</artifactId>
16-
<version>0.48.0</version>
16+
<version>0.49.0</version>
1717
</dependency>
1818
</dependencies>
1919
<build>

PluginsAndFeatures/azure-toolkit-for-intellij/.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice-java/src/main/java/com/microsoft/azure/toolkit/intellij/appservice/task/CreateWebAppTask.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ public void execute() throws Exception {
5252
webAppConfig.subscriptionId(subscription.getId());
5353
webAppConfig.runtime(RuntimeConfig.fromRuntime(WebAppRuntime.getDefaultJavaseRuntime()));
5454

55-
final String rgName = Utils.generateRandomResourceName(String.format("rg-%s", name), 90);
56-
webAppConfig.resourceGroup(rgName);
5755
final WebAppBase<?, ?, ?> webApp = WebAppService.getInstance().createWebApp(webAppConfig);
5856
context.applyResult(WEBAPP_ID, webApp.getId());
5957
context.applyResult(RESOURCE_GROUP, webApp.getResourceGroupName());

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.microsoft.azure.toolkit.ide.common.action.ResourceCommonActionsContributor;
1212
import com.microsoft.azure.toolkit.intellij.common.TerminalUtils;
1313
import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem;
14+
import com.microsoft.azure.toolkit.lib.appservice.model.Runtime;
1415
import com.microsoft.azure.toolkit.lib.appservice.webapp.WebApp;
1516
import com.microsoft.azure.toolkit.lib.common.action.Action;
1617
import com.microsoft.azure.toolkit.lib.common.action.AzureActionManager;
@@ -30,6 +31,7 @@
3031
import java.io.IOException;
3132
import java.nio.charset.StandardCharsets;
3233
import java.util.AbstractList;
34+
import java.util.Optional;
3335

3436
import static com.microsoft.azure.toolkit.intellij.common.AzureBundle.message;
3537
import static com.microsoft.azure.toolkit.lib.common.operation.OperationBundle.description;
@@ -47,7 +49,7 @@ public class SSHIntoWebAppAction {
4749
private static final String WEB_APP_DOCKER_PREFIX = "DOCKER|";
4850
private static final String CMD_SSH_TO_LOCAL_PROXY =
4951
"ssh -o StrictHostKeyChecking=no -o \"UserKnownHostsFile /dev/null\" -o \"LogLevel ERROR\" %[email protected] -p %d";
50-
52+
private static final Integer TERMINAL_MAX_SIZE = 1024 * 8;
5153
private static final String WEBAPP_TERMINAL_TABLE_NAME = "SSH - %s";
5254
private static final String RESOURCE_GROUP_PATH_PREFIX = "resourceGroups/";
5355
private static final String RESOURCE_ELEMENT_PATTERN = "[^/]+";
@@ -70,7 +72,7 @@ public void execute() {
7072
final AzureString title = description("user/webapp.connect_ssh.app", webAppName);
7173
AzureTaskManager.getInstance().runInBackground(new AzureTask<>(project, title, false,
7274
() -> {
73-
if (webApp.getRuntime().getOperatingSystem() == OperatingSystem.WINDOWS) {
75+
if (Optional.ofNullable(webApp.getRuntime()).map(Runtime::getOperatingSystem).orElse(null) == OperatingSystem.WINDOWS) {
7476
AzureMessager.getMessager().warning(message("webapp.ssh.windowsNotSupport"));
7577
return;
7678
}
@@ -131,12 +133,14 @@ private static boolean waitForInputPassword(TtyConnector connector) throws Illeg
131133
final int interval = 500;
132134
final int times = 30000 / interval;
133135
while (count++ < times) {
134-
final AbstractList<Byte> outputCache = (AbstractList<Byte>) FieldUtils.readField(connector, "outputCache", true);
135-
Byte[] bytes = new Byte[outputCache.size()];
136-
bytes = outputCache.toArray(bytes);
137-
final byte[] myBuf = ArrayUtils.toPrimitive(bytes);
138-
if (myBuf != null && new String(myBuf, StandardCharsets.UTF_8).contains("password:")) {
139-
return true;
136+
try {
137+
final char[] result = new char[TERMINAL_MAX_SIZE];
138+
connector.read(result, 0, TERMINAL_MAX_SIZE -1 );
139+
if (new String(result).contains("password:")) {
140+
return true;
141+
}
142+
} catch (final IOException ignore) {
143+
continue;
140144
}
141145
Thread.sleep(interval);
142146
}

0 commit comments

Comments
 (0)