Skip to content

Commit

Permalink
mgmt, appservice functionapp on ACA fix, prepare release (#38154)
Browse files Browse the repository at this point in the history
* test

* implementation

* assets.json

* version_client.txt

* pom.xml

* readme.md

* changelog.md

* single_service_packages.md
  • Loading branch information
XiaofeiCao authored Dec 22, 2023
1 parent 8103e9a commit 3626886
Show file tree
Hide file tree
Showing 81 changed files with 299 additions and 287 deletions.
48 changes: 24 additions & 24 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,32 +249,32 @@ com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;4.14.0;4.15.0-beta.1
com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;4.14.0;4.15.0-beta.1
com.azure.spring:spring-cloud-azure-stream-binder-servicebus;4.14.0;4.15.0-beta.1
com.azure.spring:spring-cloud-azure-trace-sleuth;4.14.0;4.15.0-beta.1
com.azure.resourcemanager:azure-resourcemanager;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appservice;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-authorization;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-cdn;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-compute;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-containerservice;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-cosmos;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-dns;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-keyvault;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-monitor;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-msi;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-network;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-appservice;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-authorization;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-cdn;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-compute;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-containerservice;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-cosmos;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-dns;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-keyvault;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-monitor;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-msi;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-network;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-privatedns;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-resources;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-redis;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-privatedns;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-resources;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-redis;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-search;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-servicebus;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-sql;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-storage;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.33.0;2.34.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-search;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-servicebus;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-sql;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-storage;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.33.0;2.34.0
com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.1;2.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-mediaservices;2.3.0;2.4.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-mysql;1.0.2;1.1.0-beta.1
Expand Down
8 changes: 4 additions & 4 deletions sdk/resourcemanager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For your convenience, we have provided a multi-service package that includes som
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager</artifactId>
<version>2.33.0</version>
<version>2.34.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -100,7 +100,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -112,7 +112,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.13.10</version>
<version>1.13.11</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -303,7 +303,7 @@ For example, here is sample maven dependency for Compute package.
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-compute</artifactId>
<version>2.33.0</version>
<version>2.34.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Release History

## 2.34.0-beta.1 (Unreleased)
## 2.34.0 (2023-12-22)

### Features Added

### Breaking Changes
### Other Changes

### Bugs Fixed
#### Dependency Updates

### Other Changes
- Updated core dependency from resources.

## 2.33.0 (2023-11-24)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appplatform</artifactId>
<version>2.33.0</version>
<version>2.34.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
10 changes: 5 additions & 5 deletions sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appplatform</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appplatform;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appplatform;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for App Platform Management</name>
Expand Down Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down Expand Up @@ -108,19 +108,19 @@
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-keyvault</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;current} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-dns</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;current} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appservice</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;current} -->
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# Release History

## 2.34.0-beta.1 (Unreleased)
## 2.34.0 (2023-12-22)

### Features Added

- Supported Function App in Azure Container Apps environment.
- Supported `withManagedEnvironmentId` for `FunctionApp`.
- Supported `withMaxReplica` and `withMinReplica` for `FunctionApp`.

### Breaking Changes

### Bugs Fixed

### Other Changes

## 2.33.0 (2023-11-24)

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appservice</artifactId>
<version>2.33.0</version>
<version>2.34.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-appservice",
"Tag": "java/resourcemanager/azure-resourcemanager-appservice_2e8daf983d"
"Tag": "java/resourcemanager/azure-resourcemanager-appservice_9c589b3b57"
}
12 changes: 6 additions & 6 deletions sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appservice</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for App Service Management</name>
Expand Down Expand Up @@ -65,27 +65,27 @@
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-storage</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;current} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-msi</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;current} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-keyvault</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;current} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-dns</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;current} -->
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.azure.resourcemanager.appservice.fluent.models.SiteLogsConfigInner;
import com.azure.resourcemanager.appservice.fluent.models.SitePatchResourceInner;
import com.azure.resourcemanager.appservice.models.AppServicePlan;
import com.azure.resourcemanager.appservice.models.AppSetting;
import com.azure.resourcemanager.appservice.models.FunctionApp;
import com.azure.resourcemanager.appservice.models.FunctionAuthenticationPolicy;
import com.azure.resourcemanager.appservice.models.FunctionDeploymentSlots;
Expand Down Expand Up @@ -62,6 +63,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/** The implementation for FunctionApp. */
class FunctionAppImpl
Expand Down Expand Up @@ -698,6 +700,31 @@ public FunctionAppImpl withMinReplicas(int minReplicas) {
return this;
}

@Override
public Mono<Map<String, AppSetting>> getAppSettingsAsync() {
if (isFunctionAppOnACA()) {
// current function app on ACA doesn't support deployment slot, so appSettings sticky is false
return listAppSettings()
.map(
appSettingsInner ->
appSettingsInner
.properties()
.entrySet()
.stream()
.collect(
Collectors
.toMap(
Map.Entry::getKey,
entry ->
new AppSettingImpl(
entry.getKey(),
entry.getValue(),
false))));
} else {
return super.getAppSettingsAsync();
}
}

/**
* Whether this Function App is on Azure Container Apps environment.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment;
import com.azure.resourcemanager.appservice.models.AppServicePlan;
import com.azure.resourcemanager.appservice.models.AppSetting;
import com.azure.resourcemanager.appservice.models.ConnectionStringType;
import com.azure.resourcemanager.appservice.models.FunctionApp;
import com.azure.resourcemanager.appservice.models.FunctionAppBasic;
import com.azure.resourcemanager.appservice.models.FunctionDeploymentSlot;
Expand Down Expand Up @@ -248,10 +249,12 @@ public void canCRUDLinuxFunctionApp() throws Exception {
.withBuiltInImage(FunctionRuntimeStack.JAVA_8)
.withHttpsOnly(true)
.withAppSetting("WEBSITE_RUN_FROM_PACKAGE", FUNCTION_APP_PACKAGE_URL)
.withConnectionString("connectionName", "connectionValue", ConnectionStringType.CUSTOM)
.create();
Assertions.assertNotNull(functionApp1);
assertLinuxJava(functionApp1, FunctionRuntimeStack.JAVA_8);
Assertions.assertFalse(functionApp1.alwaysOn());
Assertions.assertEquals("connectionValue", functionApp1.getConnectionStrings().get("connectionName").value());

AppServicePlan plan1 = appServiceManager.appServicePlans().getById(functionApp1.appServicePlanId());
Assertions.assertNotNull(plan1);
Expand Down Expand Up @@ -510,6 +513,9 @@ public void canCreateAndUpdateFunctionAppOnACA() {
.withMaxReplicas(10)
.withMinReplicas(3)
.withPublicDockerHubImage("mcr.microsoft.com/azure-functions/dotnet7-quickstart-demo:1.0")
// backend has bug, it returns Array instead of Object:
// https://github.com/Azure/azure-rest-api-specs/issues/27176
// .withConnectionString("connectionName", "connectionValue", ConnectionStringType.CUSTOM)
.create();

FunctionApp functionApp = appServiceManager.functionApps().getByResourceGroup(rgName1, webappName1);
Expand All @@ -518,6 +524,9 @@ public void canCreateAndUpdateFunctionAppOnACA() {
Assertions.assertEquals(10, functionApp.maxReplicas());
Assertions.assertEquals(3, functionApp.minReplicas());

Assertions.assertNotNull(functionApp.getAppSettings());
// Assertions.assertEquals("connectionValue", functionApp.getConnectionStrings().get("connectionName").value());

functionApp.update()
.withMaxReplicas(15)
.apply();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Release History

## 2.34.0-beta.1 (Unreleased)
## 2.34.0 (2023-12-22)

### Features Added

### Breaking Changes
### Other Changes

### Bugs Fixed
#### Dependency Updates

### Other Changes
- Updated core dependency from resources.

## 2.33.0 (2023-11-24)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-authorization</artifactId>
<version>2.33.0</version>
<version>2.34.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-authorization</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Authorization Management</name>
Expand Down Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
<version>2.34.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
<version>2.34.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;current} -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
10 changes: 4 additions & 6 deletions sdk/resourcemanager/azure-resourcemanager-cdn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Release History

## 2.34.0-beta.1 (Unreleased)
## 2.34.0 (2023-12-22)

### Features Added

### Breaking Changes
### Other Changes

### Bugs Fixed
#### Dependency Updates

### Other Changes
- Updated core dependency from resources.

## 2.33.0 (2023-11-24)

Expand Down
Loading

0 comments on commit 3626886

Please sign in to comment.