Skip to content

Commit

Permalink
Communication release (#26150)
Browse files Browse the repository at this point in the history
* fix Build error

* Update AutoRest C# version to 3.0.0-beta.20211222.1 (#26024)

* Delete unused records (#26036)

* MockTestBase: playback if no mock server (#25880)

* check-and-playback

* don't ensure in playback

* stateless-mock

* update-mock-page

* Update unit test cases

1. update TestBase.cs
2. delete ListByRGTests and CheckAvailabilityTests
3. modify CommunicationCrudTests and NotificationHubTests

* re-gen

* Update Azure.ResourceManager.Communication.netstandard2.0.cs

* sample

* Update AutoRest C# version (#26041)

* Update AutoRest C# version to 3.0.0-beta.20211222.4

* update api

* fix test cases in appconfiguration

* update compute test

* update cosmosdb test

* update keyvault test

* update snippets

* update eventhub

Co-authored-by: ArcturusZhang <dapzhang@microsoft.com>

* Release Azure.ResourceManager 1.0.0-beta.7 (#26040)

* update version to 1.0.0-beta.7

* Update CHANGELOG.md

* update readme

* re-gen

* rename

* Update Azure.ResourceManager.Communication.netstandard2.0.cs

* changlog

* SDK update for recoveryservices-backup (#26025)

* SDK update for recoveryservices-backup

* Updating

* Updating tests

* Updating assemblyInfo, csproj and azSDK.RP.props

* Update AutoRest C# version to 3.0.0-beta.20211223.1 (#26052)

* update autorest.md in connectedvmware (#26051)

* update autorest.md

* delete the directory with old casing

* regenerate everything

* fix casing

* change the casing

* remove auto generated things

* finally

* update api

* missed one casing in test project

* update sample

* drop duplicated [.cs] suffix

* Update README.md

* bump resource manager version (#26053)

* docs(network): changes for beta5 (#26054)

- add change logs
- update README.md

* docs(storage): changes for beta5 (#26055)

- add change logs
- update README.md

* Update AutoRest C# version (#26061)

* Update AutoRest C# version to 3.0.0-beta.20211224.1

* fix

Co-authored-by: ArcturusZhang <dapzhang@microsoft.com>

* Increment version for resourcemanager releases (#26050)

Increment package version after release of Azure.ResourceManager

* docs(cosmos): prepare change log for beta2 (#26066)

1. add change log for cosmos beta.2
2. fix change logs of network and storage

* [Resources][Compute][KeyVault] Update changelog and readme (#26058)

* update changelog and readme

* update changelog again

* update

* address comments

* update network and storage

* update changelog of cosmos and sql (#26067)

* update changelog of cosmos and sql

* update

* Revert the version of ResourceManager back to beta.7 to unblock release RP libs (#26074)

* Avoid always locking in BearerTokenAuthenticationPolicy (#25522)

* Ignore private setters during strongly typed deserialization (#26078)

* Spelling fix (#26075)

* prepare network and cosmos beta release (#26079)

bump release date of:
- network beta.5
- cosmos beta.2

* clean up configurations (#26070)

* prepare release for storage beta.5 (#26080)

bump release date

* Increment version for network releases (#26082)

Increment package version after release of Azure.ResourceManager.Network

* Refine the configuration of AppService (#26056)

* some update on autorest.md

* some changes

* some changes

* fix test cases

* update api

* update release date (#26088)

* Rename ConnectedVMware to ConnectedVMwarevSphere (#26090)

* Rename ConnectedVMware to ConnectedVMwarevSphere

* Update spell check

* Fixed casing problem

* Increment version for keyvault releases (#26093)

Increment package version after release of Azure.ResourceManager.KeyVault

* Increment version for resources releases (#26092)

Increment package version after release of Azure.ResourceManager.Resources

* Release Azure.ResourceManager.WebPubSub 1.0.0-beta.2 (#26091)

* Release Azure.ResourceManager.Sql 1.0.0-beta.2 (#26089)

* update release date

* Update README.md

* Increment version for compute releases (#26094)

Increment package version after release of Azure.ResourceManager.Compute

* update changelog (#26096)

* Release Azure.ResourceManager.WebPubSub 1.0.0-beta.2  (#26099)

* Release Azure.ResourceManager.WebPubSub 1.0.0-beta.2

* Update change log

* Increment version for cosmosdb releases (#26083)

Increment package version after release of Azure.ResourceManager.CosmosDB

* Increment version for deviceupdate releases (#26100)

Increment package version after release of Azure.ResourceManager.DeviceUpdate

* Increment version for storage releases (#26084)

Increment package version after release of Azure.ResourceManager.Storage

* Increment version for servicebus releases (#26101)

Increment package version after release of Azure.ResourceManager.ServiceBus

* Increment version for cdn releases (#26102)

Increment package version after release of Azure.ResourceManager.Cdn

* Increment version for webpubsub releases (#26105)

Increment package version after release of Azure.ResourceManager.WebPubSub

* Increment version for sqlmanagement releases (#26106)

Increment package version after release of Azure.ResourceManager.Sql

* Update AzureSDKCodeGeneration_DataPlane_Quickstart.md (#26108)

Minor typo mistake

* Increment package version after release of Azure.ResourceManager.EventHubs (#26103)

* docs(core): improve pipeline sample (#26095)

* Add compatibility tests for Table extension (#26038)

* Update AutoRest C# version to 3.0.0-beta.20211227.1 (#26104)

* Update AutoRest C# version to 3.0.0-beta.20211228.3 (#26112)

* Temporarily disable HSM backup/restore tests (#26123)

* feat(resourcemanager): add `TypeReferenceTypeAttribute` (#26127)

Add an attribute which can be used to mark `x-ms-mgmt-typeReferenceType`

part of Azure/autorest.csharp#1761

* Disable missed backup/restore test (#26142)

* Rework binding configuration in Table extension (#26111)

* Add Microsoft.Azure.WebJobs.Extensions.Tables to artifacts (#26145)

* Sync eng/common directory with azure-sdk-tools for PR 2464 (#26143)

* Support AAD graph and Microsoft Graph service principal APIs

* Consolidate service principal wrapper creation

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* remove one instrument operation (#26113)

* Rename Parameters to Options

* Remove [TaggedResource]

* Revert "Remove [TaggedResource]"

This reverts commit 4ab3584.

Co-authored-by: Chengming Ruan (WICRESOFT NORTH AMERICA LTD) <v-cruan@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: changlong-liu <59815250+changlong-liu@users.noreply.github.com>
Co-authored-by: ArcturusZhang <dapzhang@microsoft.com>
Co-authored-by: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com>
Co-authored-by: Pratima Upadhyay <pratima.upadhyay02@gmail.com>
Co-authored-by: Yao Kou <yaokou@microsoft.com>
Co-authored-by: Mingzhe Huang <archerzz@users.noreply.github.com>
Co-authored-by: Arthur Ma <arthurma@microsoft.com>
Co-authored-by: John Call <johncall@microsoft.com>
Co-authored-by: Ken Dale <ken@kendaleiv.com>
Co-authored-by: Boby <73424060+bobychaudhary@users.noreply.github.com>
Co-authored-by: Heath Stewart <heaths@microsoft.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
  • Loading branch information
16 people authored Jan 4, 2022
1 parent 4444b8d commit 71ab0a3
Show file tree
Hide file tree
Showing 2,706 changed files with 314,079 additions and 286,565 deletions.
2 changes: 1 addition & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
]
},
{
"filename": "**/sdk/connectedvmware/**/*",
"filename": "**/sdk/connectedvmwarevsphere/**/*",
"words": [
"Ctlr",
"Lsilogic",
Expand Down
22 changes: 17 additions & 5 deletions common/ManagementTestShared/Redesign/MockTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ public MockTestBase(bool isAsync) : base(isAsync)
EnsureMockServerRunning();
}

public MockTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
public MockTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, !IsMockServerRunning()? RecordedTestMode.Playback: mode)
{
EnsureMockServerRunning();
}

private void EnsureMockServerRunning()
Expand All @@ -27,18 +26,31 @@ private void EnsureMockServerRunning()
TestMockServerRunning();
}

private void TestMockServerRunning()
private static bool IsMockServerRunning()
{
try
{
TestMockServerRunning();
}
catch (Exception)
{
return false;
}
return true;
}

private static void TestMockServerRunning()
{
using (var tcpClient = new TcpClient())
{
try
{
var uri = new Uri(TestEnvironment.MockEndPoint);
var uri = new Uri(MockTestEnvironment.MockEndPoint);
tcpClient.Connect(uri.Host, uri.Port);
}
catch (SocketException)
{
throw new InvalidOperationException("The mock server is not running, please start the mock server following this guide `https://devdiv.visualstudio.com/DevDiv/_git/avs?path=%2FREADME.md` in order to record the test");
throw new InvalidOperationException("The mock server is not running, please start the mock server following this guide `https://github.com/Azure/azure-sdk-tools/tree/main/tools/mock-service-host` in order to record the test");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public MockTestEnvironment() : base()
Environment.SetEnvironmentVariable("RESOURCE_MANAGER_URL", MockEndPoint);
}

public virtual string MockEndPoint => $"https://localhost:8441";
public static string MockEndPoint = $"https://localhost:8443";

private TokenCredential _mockCredential;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ In Visual Studio:

#### 4. Update the Assembly Info

You'll notice that the `Azure.<group>.<service>` project has `properties/AssemblyInfo.cs` file in it. Replace `Microsoft.Test` namespace with the correct resource provider namepace for your service.
You'll notice that the `Azure.<group>.<service>` project has `properties/AssemblyInfo.cs` file in it. Replace `Microsoft.Test` namespace with the correct resource provider namespace for your service.

**Learn more:** see the [Azure Services Resource Providers](https://docs.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) for the list of possible namespaces.

Expand Down Expand Up @@ -198,4 +198,4 @@ README.md file instructions are listed in `Azure.<group>.<service>/README.md` fi

## Changelog

Update the CHANGELOG.md file which exists in `Azure.<group>.<service>/CHANGELOG.md`. For general information about the changelog, see the [Changelog Guidelines](https://azure.github.io/azure-sdk/policies_releases.html#change-logs).
Update the CHANGELOG.md file which exists in `Azure.<group>.<service>/CHANGELOG.md`. For general information about the changelog, see the [Changelog Guidelines](https://azure.github.io/azure-sdk/policies_releases.html#change-logs).
4 changes: 2 additions & 2 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<PackageReference Update="Azure.Security.KeyVault.Certificates" Version="4.2.0" />
<PackageReference Update="Azure.Storage.Blobs" Version="12.10.0" />
<PackageReference Update="Azure.Storage.Queues" Version="12.8.0" />
<PackageReference Update="Azure.ResourceManager" Version="1.0.0-beta.6" />
<PackageReference Update="Azure.ResourceManager" Version="1.0.0-beta.7" />

<!-- Other approved packages -->
<PackageReference Update="Microsoft.Azure.Amqp" Version="2.5.8" />
Expand Down Expand Up @@ -147,7 +147,7 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211216.2" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211228.3" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210903.4" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
Expand Down
54 changes: 44 additions & 10 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,42 @@ function Retry([scriptblock] $Action, [int] $Attempts = 5)
}
}

# NewServicePrincipalWrapper creates an object from an AAD graph or Microsoft Graph service principal object type.
# This is necessary to work around breaking changes introduced in Az version 7.0.0:
# https://azure.microsoft.com/en-us/updates/update-your-apps-to-use-microsoft-graph-before-30-june-2022/
function NewServicePrincipalWrapper([string]$subscription, [string]$resourceGroup, [string]$displayName)
{
$servicePrincipal = Retry {
New-AzADServicePrincipal -Role "Owner" -Scope "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName" -DisplayName $displayName
}
$spPassword = ""
$appId = ""
if (Get-Member -Name "Secret" -InputObject $servicePrincipal -MemberType property) {
Write-Verbose "Using legacy PSADServicePrincipal object type from AAD graph API"
# Secret property exists on PSADServicePrincipal type from AAD graph in Az # module versions < 7.0.0
$spPassword = $servicePrincipal.Secret
$appId = $servicePrincipal.ApplicationId
} else {
Write-Verbose "Creating password for service principal via MS Graph API"
# Microsoft graph objects (Az version >= 7.0.0) do not provision a secret # on creation so it must be added separately.
# Submitting a password credential object without specifying a password will result in one being generated on the server side.
$password = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphPasswordCredential"
$password.DisplayName = "Password for $displayName"
$credential = Retry { New-AzADSpCredential -PasswordCredentials $password -ServicePrincipalObject $servicePrincipal }
$spPassword = ConvertTo-SecureString $credential.SecretText -AsPlainText -Force
$appId = $servicePrincipal.AppId
}

return @{
AppId = $appId
ApplicationId = $appId
# This is the ObjectId/OID but most return objects use .Id so keep it consistent to prevent confusion
Id = $servicePrincipal.Id
DisplayName = $servicePrincipal.DisplayName
Secret = $spPassword
}
}

function LoadCloudConfig([string] $env)
{
$configPath = "$PSScriptRoot/clouds/$env.json"
Expand Down Expand Up @@ -522,8 +558,8 @@ try {
# If no test application ID was specified during an interactive session, create a new service principal.
if (!$CI -and !$TestApplicationId) {
# Cache the created service principal in this session for frequent reuse.
$servicePrincipal = if ($AzureTestPrincipal -and (Get-AzADServicePrincipal -ApplicationId $AzureTestPrincipal.ApplicationId) -and $AzureTestSubscription -eq $SubscriptionId) {
Log "TestApplicationId was not specified; loading cached service principal '$($AzureTestPrincipal.ApplicationId)'"
$servicePrincipal = if ($AzureTestPrincipal -and (Get-AzADServicePrincipal -ApplicationId $AzureTestPrincipal.AppId) -and $AzureTestSubscription -eq $SubscriptionId) {
Log "TestApplicationId was not specified; loading cached service principal '$($AzureTestPrincipal.AppId)'"
$AzureTestPrincipal
} else {
Log "TestApplicationId was not specified; creating a new service principal in subscription '$SubscriptionId'"
Expand All @@ -537,19 +573,17 @@ try {
$displayName = "$($baseName)$suffix.test-resources.azure.sdk"
}

$servicePrincipal = Retry {
New-AzADServicePrincipal -Role "Owner" -Scope "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName" -DisplayName $displayName
}
$servicePrincipalWrapper = NewServicePrincipalWrapper -subscription $SubscriptionId -resourceGroup $ResourceGroupName -displayName $DisplayName

$global:AzureTestPrincipal = $servicePrincipal
$global:AzureTestPrincipal = $servicePrincipalWrapper
$global:AzureTestSubscription = $SubscriptionId

Log "Created service principal '$($AzureTestPrincipal.ApplicationId)'"
$AzureTestPrincipal
Log "Created service principal. AppId: '$($AzureTestPrincipal.AppId)' ObjectId: '$($AzureTestPrincipal.Id)'"
$servicePrincipalWrapper
$resourceGroupRoleAssigned = $true
}

$TestApplicationId = $servicePrincipal.ApplicationId
$TestApplicationId = $servicePrincipal.AppId
$TestApplicationOid = $servicePrincipal.Id
$TestApplicationSecret = (ConvertFrom-SecureString $servicePrincipal.Secret -AsPlainText)
}
Expand Down Expand Up @@ -886,7 +920,7 @@ Bicep templates, test-resources.bicep.env.
.PARAMETER SuppressVsoCommands
By default, the -CI parameter will print out secrets to logs with Azure Pipelines log
commands that cause them to be redacted. For CI environments that don't support this (like
commands that cause them to be redacted. For CI environments that don't support this (like
stress test clusters), this flag can be set to $false to avoid printing out these secrets to the logs.
.EXAMPLE
Expand Down
23 changes: 19 additions & 4 deletions eng/mgmt/mgmtmetadata/recoveryservicesbackup_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,28 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicesbackup/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\SDK\azure-sdk-for-net\sdk
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicesbackup/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.namespace=Microsoft.Azure.Management.RecoveryServices.Backup --tag=package-2021-10 --csharp.output-folder=C:\SWagger\sdkupdateforOctoberrelease\new\azure-sdk-for-net\sdk\recoveryservices-backup\Microsoft.Azure.Management.RecoveryServices.Backup\src\recoveryservicesbackup\Generated
Autorest CSharp Version: 2.3.82
2021-09-24 09:31:10 UTC
2021-12-21 11:48:37 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: main
Commit: e5b604e04e917bc2b0c9673449491b89edb09211
Commit: 0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf
AutoRest information
Requested version: v2
Bootstrapper version: autorest@3.3.2
Bootstrapper version: autorest@2.0.4413
Installing AutoRest version: v2
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicesbackup/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.namespace=Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore --tag=package-passivestamp-2018-12-20 --csharp.output-folder=C:\SWagger\sdkupdateforOctoberrelease\new\azure-sdk-for-net\sdk\recoveryservices-backup\Microsoft.Azure.Management.RecoveryServices.Backup\src\recoveryservicesbackupCrossregionRestoe\Generated
Autorest CSharp Version: 2.3.82
2021-12-21 11:49:49 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: main
Commit: 0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413
Loading

0 comments on commit 71ab0a3

Please sign in to comment.