Skip to content

Commit

Permalink
Merge pull request #2 from Azure/main
Browse files Browse the repository at this point in the history
rebase from main
  • Loading branch information
chunyu3 authored Aug 26, 2021
2 parents 35f8df9 + 22895cb commit 12538d7
Show file tree
Hide file tree
Showing 1,063 changed files with 36,022 additions and 362,680 deletions.
4 changes: 2 additions & 2 deletions eng/Directory.Build.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@

<!--TODO: update build targets - ADO 5668-->
<PropertyGroup>
<MgmtCoreShared>$(MSBuildThisFileDirectory)/../common/ManagementCoreShared</MgmtCoreShared>
<MgmtCoreShared>$(MSBuildThisFileDirectory)/../sdk/resourcemanager/Azure.ResourceManager/src/Shared</MgmtCoreShared>
<ExcludeMgmtCoreShared Condition="'$(ExcludeMgmtCoreShared)' == ''">false</ExcludeMgmtCoreShared>
</PropertyGroup>

<ItemGroup Condition="'$(IsMgmtLibrary)' == 'true' and '$(IsTestProject)' != 'true' and '$(ExcludeMgmtCoreShared)' == 'false'">
<ItemGroup Condition="'$(IsMgmtSubLibrary)' == 'true' and '$(IsMgmtLibrary)' == 'true' and '$(IsTestProject)' != 'true' and '$(ExcludeMgmtCoreShared)' == 'false'">
<Compile Include="$(MgmtCoreShared)/**/*.cs"
Link="Shared/Management/%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

<!-- Packages intended for Management libraries only -->
<ItemGroup Condition="'$(IsMgmtSubLibrary)' == 'true'">
<PackageReference Update="Azure.ResourceManager" Version="1.0.0-alpha.20210730.2" />
<PackageReference Update="Azure.ResourceManager" Version="1.0.0-alpha.20210825.3" />
</ItemGroup>

<!-- Packages intended for Extensions libraries only -->
Expand All @@ -137,7 +137,7 @@
All should have PrivateAssets="All" set so they don't become pacakge dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210805.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210825.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210601.1" 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
31 changes: 17 additions & 14 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ $ErrorActionPreference = 'Stop'
. $PSScriptRoot/find-all-stress-packages.ps1
$FailedCommands = New-Object Collections.Generic.List[hashtable]

if (!(Get-Module powershell-yaml)) {
Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser
}
. (Join-Path $PSScriptRoot "../Helpers" PSModule-Helpers.ps1)
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module

# Powershell does not (at time of writing) treat exit codes from external binaries
# as cause for stopping execution, so do this via a wrapper function.
Expand Down Expand Up @@ -51,7 +50,10 @@ function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImage
RunOrExitOnFailure az login --allow-no-subscriptions
}

$clusterName = (az aks list -g $clusterGroup -o json| ConvertFrom-Json).name
# Discover cluster name, only one cluster per group is expected
Write-Host "Listing AKS cluster in $subscription/$clusterGroup"
$cluster = RunOrExitOnFailure az aks list -g $clusterGroup --subscription $subscription -o json
$clusterName = ($cluster | ConvertFrom-Json).name

RunOrExitOnFailure az aks get-credentials `
-n "$clusterName" `
Expand All @@ -60,8 +62,9 @@ function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImage
--overwrite-existing

if ($pushImages) {
$registry = (az acr list -g $clusterGroup -o json | ConvertFrom-Json).name
RunOrExitOnFailure az acr login -n $registry
$registry = RunOrExitOnFailure az acr list -g $clusterGroup --subscription $subscription -o json
$registryName = ($registry | ConvertFrom-Json).name
RunOrExitOnFailure az acr login -n $registryName
}
}

Expand Down Expand Up @@ -110,11 +113,8 @@ function DeployStressPackage(
[string]$repository,
[boolean]$pushImages
) {
$registry = (az acr list -g $clusterGroup -o json | ConvertFrom-Json).name
if (!$registry) {
Write-Host "Could not find container registry in resource group $clusterGroup"
exit 1
}
$registry = RunOrExitOnFailure az acr list -g $clusterGroup --subscription $subscription -o json
$registryName = ($registry | ConvertFrom-Json).name

Run helm dependency update $pkg.Directory
if ($LASTEXITCODE) { return }
Expand All @@ -133,7 +133,7 @@ function DeployStressPackage(
if (!$imageName) {
$imageName = $dockerFile.Directory.Name
}
$imageTag = "${registry}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
$imageTag = "${registryName}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
Write-Host "Building and pushing stress test docker image '$imageTag'"
Run docker build -t $imageTag -f $dockerFile.FullName $dockerFile.DirectoryName
if ($LASTEXITCODE) { return }
Expand All @@ -154,7 +154,7 @@ function DeployStressPackage(
Run helm upgrade $pkg.ReleaseName $pkg.Directory `
-n $pkg.Namespace `
--install `
--set repository=$registry.azurecr.io/$repository `
--set repository=$registryName.azurecr.io/$repository `
--set tag=$deployId `
--set stress-test-addons.env=$environment
if ($LASTEXITCODE) {
Expand All @@ -176,4 +176,7 @@ function DeployStressPackage(
Run kubectl label secret -n $pkg.Namespace --overwrite $helmReleaseConfig deployId=$deployId
}

DeployStressTests @PSBoundParameters
# Don't call functions when the script is being dot sourced
if ($MyInvocation.InvocationName -ne ".") {
DeployStressTests @PSBoundParameters
}
4 changes: 2 additions & 2 deletions eng/mgmt/mgmtmetadata/containerservice_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerservice/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\Users\kaiqz\github\kaiqzhan\azure-sdk-for-net\sdk
Autorest CSharp Version: 2.3.82
2021-07-01 22:14:06 UTC
2021-08-05 22:01:48 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: b5b3ae9a081535b4dabce52a1136eece3e2d469f
Commit: 111fbceeeb7c2c4905b80fe2ab760e5564b3458a
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413
9 changes: 5 additions & 4 deletions eng/mgmt/mgmtmetadata/recoveryservices_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ 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/master/specification/recoveryservices/resource-manager/readme.md --csharp --version=V2 --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\sdk
2020-11-20 06:08:12 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservices/resource-manager/readme.md --csharp --version=V2 --reflect-api-versions --csharp-sdks-folder=C:\azure-sdk-for-net\sdk
Autorest CSharp Version: 2.3.82
2021-08-12 09:10:28 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 88fa0d128fbcf2d1ff3b330add6b4425c84f4149
Commit: 70626b932d16a97361673e0bcba7570284fe0813
AutoRest information
Requested version: V2
Bootstrapper version: autorest@2.0.4413
Bootstrapper version: autorest@3.1.5
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ 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/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\repos\azure-sdk-for-net\sdk
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\GIT\AsrOneSdk\azure-sdk-for-net\sdk
Autorest CSharp Version: 2.3.82
2021-04-23 06:40:39 UTC
2021-08-24 16:41:48 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 77df9507f58fcc7a9a4eb6c86d748535f74ca08e
Commit: 6de27dc43268e23cbb322bdf18016c8b944f8926
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413
7 changes: 4 additions & 3 deletions eng/mgmt/mgmtmetadata/security_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ 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/master/specification/security/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\Rome\apiVteam\azure-sdk-for-net\sdk
2020-11-04 11:48:54 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/security/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\code\azure-sdk-for-net\sdk
Autorest CSharp Version: 2.3.82
2021-08-04 12:00:58 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 32b4d058d54d206bdf6b336677a3182feab7c07b
Commit: c981b81aa26ad4d0d156e034e6782853b4e747a1
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// your test project. If not needed, this can be deleted.
// [assembly: InternalsVisibleTo("Azure.Template.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")]

// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment.
// Replace Microsoft.Test with the correct resource provider namespace for your service and uncomment.
// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers
// for the list of possible values.
[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.AgFoodPlatform")]
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ public AnomalyDetectorRecordedTestSanitizer()
{
AddJsonPathSanitizer("$..accessToken");
AddJsonPathSanitizer("$..source");
// TODO: Remove when re-recording
LegacyConvertJsonDateTokens = true;
}

public override void SanitizeHeaders(IDictionary<string, string[]> headers)
Expand Down
Loading

0 comments on commit 12538d7

Please sign in to comment.