Skip to content

Commit b4d8d8b

Browse files
authored
Fix SDK dependency issue (#4161)
* Upgrade java SDK to 1.30.0 * Add preview to explorer node label
1 parent add2045 commit b4d8d8b

File tree

9 files changed

+27
-21
lines changed

9 files changed

+27
-21
lines changed

PluginsAndFeatures/AddLibrary/AppInsights/com.microsoft.applicationinsights.ui/src/main/java/com/microsoft/applicationinsights/ui/config/messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ depLocation=dependencies/
1414
excp=Exception in getClasspathEntries
1515
azureSDKcontainerID=com.microsoft.azuretools.SDK_CONTAINER
1616
sdkID=com.microsoft.azuretools.sdk
17-
sdkJar=dependencies/azure-1.26.0.jar
17+
sdkJar=dependencies/azure-1.30.0.jar
1818
jstDep=org.eclipse.jst.component.dependency
1919
aiCheckBoxTxt=Enable telemetry with Application Insights
2020
webxmlPath=WebContent/WEB-INF/web.xml

PluginsAndFeatures/AddLibrary/AzureLibraries/com.microsoft.azuretools.wasdkjava.ui/src/main/java/com/microsoft/azuretools/wasdkjava/ui/classpath/messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lblVersion=Version :
77
libNotAvail=Library is not available.
88
notFound=Not found
99
sdkID=com.microsoft.azuretools.sdk
10-
sdkJar=dependencies/azure-1.26.0.jar
10+
sdkJar=dependencies/azure-1.30.0.jar
1111
title=Microsoft Azure Libraries for Java
1212
verNotAvail=The selected version is not available.
1313
version1=Microsoft Azure Libraries for Java, version %s.%s.%s

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.core/src/com/microsoft/azuretools/core/utils/messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ err=Error
5656
prefFileName=WAEclipsePlugin
5757
bundleName=org.eclipse.core.runtime
5858
sdkLibBundleName=com.microsoftopentechnologies.windowsazure.tools.sdk
59-
sdkLibBaseJar=dependencies/azure-1.26.0.jar
59+
sdkLibBaseJar=dependencies/azure-1.30.0.jar
6060
SDKLocErrMsg=Error occurred while retrieving path of Azure libraries
6161
resCLExWkspRfrsh=Exception while refresh of workspace.
6262
cmhLblStrgAcc=Storage Accounts

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/util/PluginHelper.java

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

2929
public class PluginHelper {
3030

31-
private static final String AZURE_ARTIFACT = "azure-1.26.0.jar";
31+
private static final String AZURE_ARTIFACT = "azure-1.30.0.jar";
3232

3333
/**
3434
* @return resource filename in plugin's directory

Utils/azure-explorer-common/src/com/microsoft/azure/docker/ops/utils/AzureDockerUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
import com.microsoft.azure.management.resources.Location;
3333
import com.microsoft.azure.management.resources.ResourceGroup;
3434
import com.microsoft.azure.management.resources.Subscription;
35+
import com.microsoft.azure.management.storage.SkuName;
3536
import com.microsoft.azure.management.storage.StorageAccount;
37+
import com.microsoft.azure.management.storage.StorageAccountSkuType;
3638
import com.microsoft.azuretools.authmanage.SubscriptionManager;
3739
import com.microsoft.azuretools.authmanage.models.SubscriptionDetail;
3840
import com.microsoft.azuretools.sdkmanage.AzureManager;
@@ -233,7 +235,7 @@ public static List<String> getAvailableStorageAccounts(Azure azureClient, String
233235
if (azureClient != null) {
234236
for (StorageAccount storageAccount : azureClient.storageAccounts().list()) {
235237
if (vmImageSizeType != null) {
236-
if (storageAccount.sku().name().name().toLowerCase().equals(vmImageSizeType.toLowerCase())) {
238+
if (storageAccount.skuType().name() != null && storageAccount.skuType().name().equals(SkuName.fromString(vmImageSizeType.toLowerCase()))) {
237239
result.add(storageAccount.name());
238240
}
239241
} else {
@@ -255,7 +257,7 @@ public static List<AzureDockerStorageAccount> getStorageAccounts(Azure azureClie
255257
dockerStorageAccount.region = storageAccount.regionName();
256258
dockerStorageAccount.resourceGroup = storageAccount.resourceGroupName();
257259
dockerStorageAccount.sid = azureClient.subscriptionId();
258-
dockerStorageAccount.skuType = storageAccount.sku().name().name();
260+
dockerStorageAccount.skuType = storageAccount.skuType().name().toString();
259261
result.add(dockerStorageAccount);
260262
}
261263
}

Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/helpers/azure/sdk/AzureSDKManager.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,16 @@ public static StorageAccount createStorageAccount(String subscriptionId, String
6363
} else {
6464
newStorageAccountWithGroup = newStorageAccountBlank.withExistingResourceGroup(resourceGroup);
6565
}
66-
switch (kind) {
67-
case STORAGE:
68-
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKind();
69-
break;
70-
case STORAGE_V2:
71-
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKindV2();
72-
break;
73-
case BLOB_STORAGE:
74-
newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobStorageAccountKind().withAccessTier(accessTier);
75-
break;
76-
default:
77-
throw new Exception("Unknown Storage Account Kind:" + kind.toString());
66+
67+
if (Kind.STORAGE.equals(kind)) {
68+
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKind();
69+
} else if (Kind.STORAGE_V2.equals(kind)) {
70+
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKindV2();
71+
} else if (Kind.BLOB_STORAGE.equals(kind)) {
72+
newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobStorageAccountKind().withAccessTier(accessTier);
73+
} else {
74+
throw new Exception("Unknown Storage Account Kind:" + kind.toString());
75+
7876
}
7977

8078
if (enableEncription) {

Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/function/FunctionModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
public class FunctionModule extends AzureRefreshableNode implements FunctionModuleView {
4040
private static final String FUNCTION_SERVICE_MODULE_ID = FunctionModule.class.getName();
4141
private static final String ICON_PATH = "azure-functions-small.png";
42-
private static final String BASE_MODULE_NAME = "Function App";
42+
private static final String BASE_MODULE_NAME = "Function App(Preview)";
4343
private static final String FUNCTION_MODULE = "FunctionModule";
4444
private static final String FAILED_TO_DELETE_FUNCTION_APP = "Failed to delete Function App %s";
4545
private static final String ERROR_DELETING_FUNCTION_APP = "Azure Services Explorer - Error Deleting Function App";

Utils/azuretools-core/src/com/microsoft/azuretools/core/mvp/model/function/FunctionAppWrapper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.microsoft.azure.management.appservice.FunctionApp;
2727
import com.microsoft.azure.management.appservice.FunctionDeploymentSlots;
2828
import com.microsoft.azure.management.appservice.NameValuePair;
29+
import com.microsoft.azure.management.appservice.SupportedTlsVersions;
2930
import com.microsoft.azure.management.appservice.WebAppBase;
3031
import com.microsoft.azure.management.appservice.implementation.SiteInner;
3132
import com.microsoft.azure.management.storage.StorageAccount;
@@ -117,6 +118,11 @@ public FunctionApp.Update update() {
117118
return getFunctionApp().update();
118119
}
119120

121+
@Override
122+
public SupportedTlsVersions minTlsVersion() {
123+
return getFunctionApp().minTlsVersion();
124+
}
125+
120126
@Override
121127
protected WebAppBase getWebAppBase() {
122128
return getFunctionApp();

Utils/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
<dependency>
322322
<groupId>com.microsoft.azure</groupId>
323323
<artifactId>azure</artifactId>
324-
<version>1.26.0</version>
324+
<version>1.30.0</version>
325325
<exclusions>
326326
<exclusion>
327327
<groupId>javax.xml.bind</groupId>
@@ -362,7 +362,7 @@
362362
<dependency>
363363
<groupId>com.microsoft.azure</groupId>
364364
<artifactId>azure-mgmt-storage</artifactId>
365-
<version>1.26.0</version>
365+
<version>1.30.0</version>
366366
</dependency>
367367
<dependency>
368368
<groupId>com.microsoft.azure</groupId>

0 commit comments

Comments
 (0)