Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR Azure.ResourceManager.ComputeFleet] Spec changes for tool testing #8657

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
597e6ef
Generate Microsoft.MobileNetwork 2024-04-01 API SDK (#44321)
tompretty Aug 5, 2024
6623767
[AzureMonitorDistro] Reenable skipped tests (#45314)
TimothyMothra Aug 5, 2024
41ae3e1
Fix copy paste mistake in the release notes (#45342)
danielmarbach Aug 5, 2024
003fb5c
Update Azure.Core version after 1.42 release (#45330)
m-redding Aug 5, 2024
020c95e
STG 95 beta changelogs (#45354)
seanmcc-msft Aug 5, 2024
a7e1249
C# client for Model-as-a-Service (MaaS) / Model-as-a-Platform (MaaP) …
trangevi Aug 5, 2024
5372d81
Fix for issue #38780 (#45252)
welovej Aug 6, 2024
144cbe8
Updated error messages and log config for automation (#45344)
raych1 Aug 6, 2024
e37424b
Update CHANGELOG files for release (#45365)
jecmenicanikola Aug 6, 2024
496ca8d
[Storage] Fix errors impacting core ci pipeline (#45336)
m-redding Aug 6, 2024
3d8944e
Moving DataMovement ShareFiles Tests to use test extern alias, so we …
amnguye Aug 6, 2024
05bd1ad
Do not publish to the nightly MSDocs branch if nightly PublishPackage…
JimSuplizio Aug 6, 2024
e2e2e36
Sync eng/common directory with azure-sdk-tools for PR 8792 (#45374)
azure-sdk Aug 6, 2024
1282080
Sync eng/common directory with azure-sdk-tools for PR 8760 (#45335)
azure-sdk Aug 6, 2024
230bb72
Disabled DownloadAsync_WithUnreliableConnection_ConcurrentModificatio…
seanmcc-msft Aug 6, 2024
9f3cd2e
[Azure.AI.Inference] Update changelog (#45379)
trangevi Aug 6, 2024
b3cbe61
Increment version for storage releases (#45382)
azure-sdk Aug 7, 2024
bc278f4
Initial Web Job (Function binding) SDK for Web PubSub for Socket.IO (…
zackliu Aug 7, 2024
6e050de
Fix for Issue #45177 (#45343)
welovej Aug 7, 2024
a4b0a64
Update AutoRest C# version to 3.0.0-beta.20240806.3 (#45389)
azure-sdk Aug 7, 2024
0e0bf64
Increment package version after release of Azure.Data.AppConfiguratio…
azure-sdk Aug 7, 2024
ccdcfa2
Increment package version after release of Azure.AI.Inference (#45383)
azure-sdk Aug 7, 2024
a247e40
Fix to DataMovement Blob Share Recordings and Properties check (#45394)
amnguye Aug 7, 2024
283d2d6
[Azure.AI.Inference] Link updates (#45395)
trangevi Aug 7, 2024
917f8ec
[Storage] Fixed WrapKeyInternal in Azure.Storage.Blobs to calls corre…
nickliu-msft Aug 7, 2024
5462570
Sync eng/common directory with azure-sdk-tools for PR 8754 (#45384)
azure-sdk Aug 7, 2024
d6f89a9
Run autobaseline for core/main (#45357)
benbp Aug 7, 2024
cbfd30d
added sample code for armclient in China azure. (#45224)
welovej Aug 8, 2024
c296abf
Azure.AI.Language.Text updates (#45375)
quentinRobinson Aug 8, 2024
6188d30
Update AutoRest C# version to 3.0.0-beta.20240807.2 (#45406)
azure-sdk Aug 8, 2024
c2639a6
CodeGen from PR 3421 in test-repo-billy/azure-rest-api-specs
Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
# ServiceLabel: %AAD
# ServiceOwners: @adamedx

# PRLabel: %AI Model Inference
/sdk/ai/ @trangevi @dargilco @jhakulin @glharper

# ServiceLabel: %AI Model Inference
# ServiceOwners: @trangevi @dargilco @jhakulin @glharper

# ServiceLabel: %AKS
# ServiceOwners: @Azure/aks-pm

Expand Down Expand Up @@ -976,6 +982,12 @@
# ServiceLabel: %Network - Front Door %Mgmt
# ServiceOwners: @ptnan7

# PRLabel: %Network - Mobile
/sdk/mobilenetwork/Azure.ResourceManager.*/ @ArthurMa1978

# ServiceLabel: %Network - Mobile %Mgmt
# ServiceOwners: @ArthurMa1978

# PRLabel: %New Relic
/sdk/newrelicobservability/Azure.ResourceManager.*/ @dipeshbhakat-microsoft @vipray-ms

Expand Down
6 changes: 3 additions & 3 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<!-- Azure SDK packages -->
<PackageReference Update="Azure.Communication.Identity" Version="1.3.1" />
<PackageReference Update="Azure.Communication.Common" Version="1.3.0" />
<PackageReference Update="Azure.Core" Version="1.41.0" />
<PackageReference Update="Azure.Core" Version="1.42.0" />
<PackageReference Update="Azure.Core.Amqp" Version="1.3.1" />
<PackageReference Update="Azure.Core.Experimental" Version="0.1.0-preview.34" />
<PackageReference Update="Azure.Core.Expressions.DataFactory" Version="1.0.0" />
Expand Down Expand Up @@ -227,7 +227,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.20240801.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20240807.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20240429.1" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="All" />
Expand Down Expand Up @@ -388,7 +388,7 @@
</ItemGroup>

<PropertyGroup>
<TestProxyVersion>1.0.0-dev.20240801.2</TestProxyVersion>
<TestProxyVersion>1.0.0-dev.20240806.1</TestProxyVersion>
</PropertyGroup>

</Project>
72 changes: 68 additions & 4 deletions eng/common/TestResources/SubConfig-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function ShouldMarkValueAsSecret([string]$serviceName, [string]$key, [string]$va
"TenantId",
"TestApplicationId",
"TestApplicationOid",
"ProvisionerApplicationId"
"ProvisionerApplicationId",
"ProvisionerApplicationOid"
)

$serviceDirectoryPrefix = BuildServiceDirectoryPrefix $serviceName
Expand Down Expand Up @@ -129,7 +130,7 @@ function SetSubscriptionConfiguration([object]$subscriptionConfiguration)
return $subscriptionConfiguration
}

function UpdateSubscriptionConfiguration([object]$subscriptionConfigurationBase, [object]$subscriptionConfiguration)
function UpdateSubscriptionConfiguration([object]$subscriptionConfigurationBase, [object]$subscriptionConfiguration, [array]$allowedValues)
{
foreach ($pair in $subscriptionConfiguration.GetEnumerator()) {
if ($pair.Value -is [Hashtable]) {
Expand All @@ -140,13 +141,13 @@ function UpdateSubscriptionConfiguration([object]$subscriptionConfigurationBase,
# Mark values as secret so we don't print json blobs containing secrets in the logs.
# Prepend underscore to the variable name, so we can still access the variable names via environment
# variables if they get set subsequently.
if (ShouldMarkValueAsSecret "AZURE_" $nestedPair.Name $nestedPair.Value) {
if (ShouldMarkValueAsSecret "AZURE_" $nestedPair.Name $nestedPair.Value $allowedValues) {
Write-Host "##vso[task.setvariable variable=_$($nestedPair.Name);issecret=true;]$($nestedPair.Value)"
}
$subscriptionConfigurationBase[$pair.Name][$nestedPair.Name] = $nestedPair.Value
}
} else {
if (ShouldMarkValueAsSecret "AZURE_" $pair.Name $pair.Value) {
if (ShouldMarkValueAsSecret "AZURE_" $pair.Name $pair.Value $allowedValues) {
Write-Host "##vso[task.setvariable variable=_$($pair.Name);issecret=true;]$($pair.Value)"
}
$subscriptionConfigurationBase[$pair.Name] = $pair.Value
Expand All @@ -155,3 +156,66 @@ function UpdateSubscriptionConfiguration([object]$subscriptionConfigurationBase,

return $subscriptionConfigurationBase
}

# Helper function for processing sub config files from a pipeline file list yaml parameter
function UpdateSubscriptionConfigurationWithFiles([object]$baseSubConfig, [string]$fileListJson) {
if (!$fileListJson) {
return $baseSubConfig
}

$finalConfig = $baseSubConfig

$subConfigFiles = $fileListJson | ConvertFrom-Json -AsHashtable
foreach ($file in $subConfigFiles) {
# In some cases, $file could be an empty string. Get-Content will fail
# if $file is an empty string, so skip those cases.
if (!$file) {
continue
}

Write-Host "Merging sub config from file: $file"
$subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable
$allowedValues = @()
# Since the keys are all coming from a file in github, we know every key should not be marked
# as a secret. Set up these exclusions here to make pipeline log debugging easier.
foreach ($pair in $subConfig.GetEnumerator()) {
if ($pair.Value -is [Hashtable]) {
foreach($nestedPair in $pair.Value.GetEnumerator()) {
$allowedValues += $nestedPair.Name
}
} else {
$allowedValues += $pair.Name
}
}
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig $allowedValues
}

return $finalConfig
}

# Helper function for processing stringified json sub configs from pipeline parameter data
function BuildAndSetSubscriptionConfig([string]$baseSubConfigJson, [string]$additionalSubConfigsJson, [string]$subConfigFilesJson) {
$finalConfig = @{}
if ($baseSubConfigJson) {
$baseSubConfig = $baseSubConfigJson | ConvertFrom-Json -AsHashtable

Write-Host "Setting base sub config"
$finalConfig = SetSubscriptionConfiguration $baseSubConfig
}

if ($additionalSubConfigsJson) {
$subConfigs = $additionalSubConfigsJson | ConvertFrom-Json -AsHashtable

foreach ($subConfig in $subConfigs) {
Write-Host "Merging sub config from list"
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig
}
}

Write-Host "Merging sub config from files"
$finalConfig = UpdateSubscriptionConfigurationWithFiles $finalConfig $subConfigFilesJson

Write-Host ($finalConfig | ConvertTo-Json)
$serialized = $finalConfig | ConvertTo-Json -Compress
Write-Host "##vso[task.setvariable variable=SubscriptionConfiguration;]$serialized"
}
41 changes: 4 additions & 37 deletions eng/common/TestResources/build-test-resource-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,50 +37,17 @@ steps:
- pwsh: |
. ./eng/common/TestResources/SubConfig-Helpers.ps1

$finalConfig = @{}
$baseSubConfigRaw = @'
$baseSubConfigJson = @'
${{ parameters.SubscriptionConfiguration }}
'@.Trim()
if ($baseSubConfigRaw) {
$baseSubConfig = $baseSubConfigRaw | ConvertFrom-Json -AsHashtable

Write-Host "Setting base sub config"
$finalConfig = SetSubscriptionConfiguration $baseSubConfig
}

$subConfigJsonsRaw = @'
$additionalSubConfigsJson = @'
${{ convertToJson(parameters.SubscriptionConfigurations) }}
'@.Trim() -replace '"{', '{' -replace '}"', '}'

if ($subConfigJsonsRaw) {
$subConfigs = $subConfigJsonsRaw | ConvertFrom-Json -AsHashtable

foreach ($subConfig in $subConfigs) {
Write-Host "Merging sub config from list"
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig
}
}

$subConfigFilesRaw = @'
$subConfigFilesJson = @'
${{ convertToJson(parameters.SubscriptionConfigurationFilePaths) }}
'@.Trim()

if ($subConfigFilesRaw) {
$subConfigFiles = $subConfigFilesRaw | ConvertFrom-Json -AsHashtable
foreach ($file in $subConfigFiles) {
# In some cases, $file could be an empty string. Get-Content will fail
# if $file is an empty string, so skip those cases.
if (!$file) {
continue
}

Write-Host "Merging sub config from file: $file"
$subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig
}
}

Write-Host ($finalConfig | ConvertTo-Json)
$serialized = $finalConfig | ConvertTo-Json -Compress
Write-Host "##vso[task.setvariable variable=SubscriptionConfiguration;]$serialized"
BuildAndSetSubscriptionConfig $baseSubConfigJson $additionalSubConfigsJson $subConfigFilesJson
displayName: Merge subscription configurations
2 changes: 0 additions & 2 deletions eng/common/pipelines/templates/steps/detect-api-changes.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)
Artifacts: []
ArtifactName: 'packages'

steps:
Expand All @@ -14,7 +13,6 @@ steps:
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Detect-Api-Changes.ps1
arguments: >
-ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name)
-ArtifactPath ${{parameters.ArtifactPath}}
-CommitSha '$(Build.SourceVersion)'
-BuildId $(Build.BuildId)
Expand Down
16 changes: 16 additions & 0 deletions eng/common/pipelines/templates/steps/verify-changelogs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
parameters:
- name: PackagePropertiesFolder
type: string
- name: Condition
type: string
default: succeeded()

steps:
- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1
arguments: >
-PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}'
pwsh: true
displayName: Verify ChangeLogEntries
condition: ${{ parameters.Condition }}
43 changes: 43 additions & 0 deletions eng/common/pipelines/templates/steps/verify-readmes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
parameters:
- name: PackagePropertiesFolder
type: string
- name: RepoRoot
type: string
default: $(Build.SourcesDirectory)
- name: SettingsPath
type: string
default: '$(Build.SourcesDirectory)/eng/.docsettings.yml'
- name: DocWardenVersion
type: string
default: ''
- name: Condition
type: string
default: succeeded()

steps:
- pwsh: |
$packageProperties = Get-ChildItem -Recurse "${{ parameters.PackagePropertiesFolder }}" *.json

$paths = @()

foreach($propertiesFile in $packageProperties) {
$PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json

$paths += (Join-Path "$(Build.SourcesDirectory)" $PackageProp.DirectoryPath)
}

$scanPaths = $paths -join ","
Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths"
displayName: Populate Scan Paths

- task: PowerShell@2
displayName: "Verify Readmes"
condition: ${{ parameters.Condition }}
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
-DocWardenVersion '${{ parameters.DocWardenVersion }}'
-ScanPaths '$(ScanPathArgument)'
-RepoRoot ${{ parameters.RepoRoot }}
-SettingsPath ${{ parameters.SettingsPath }}
pwsh: true
30 changes: 18 additions & 12 deletions eng/common/scripts/Detect-Api-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Param (
[string] $BuildId,
[Parameter(Mandatory=$True)]
[string] $CommitSha,
[Parameter(Mandatory=$True)]
[array] $ArtifactList,
[string] $APIViewUri,
[string] $RepoFullName = "",
[string] $ArtifactName = "packages",
Expand All @@ -21,6 +19,8 @@ Param (

. (Join-Path $PSScriptRoot common.ps1)

$configFileDir = Join-Path -Path $ArtifactPath "PackageInfo"

# Submit API review request and return status whether current revision is approved or pending or failed to create review
function Submit-Request($filePath, $packageName)
{
Expand Down Expand Up @@ -64,7 +64,6 @@ function Submit-Request($filePath, $packageName)
function Should-Process-Package($pkgPath, $packageName)
{
$pkg = Split-Path -Leaf $pkgPath
$configFileDir = Join-Path -Path $ArtifactPath "PackageInfo"
$pkgPropPath = Join-Path -Path $configFileDir "$packageName.json"
if (!(Test-Path $pkgPropPath))
{
Expand Down Expand Up @@ -103,32 +102,39 @@ if (!($FindArtifactForApiReviewFn -and (Test-Path "Function:$FindArtifactForApiR
}

$responses = @{}
foreach ($artifact in $ArtifactList)

$packageProperties = Get-ChildItem -Recurse -Force "$configFileDir" `
| Where-Object { $_.Extension -eq '.json' }

foreach ($packagePropFile in $packageProperties)
{
Write-Host "Processing $($artifact.name)"
$packages = &$FindArtifactForApiReviewFn $ArtifactPath $artifact.name
$packageMetadata = Get-Content $packagePropFile | ConvertFrom-Json
Write-Host "Processing $($packageMetadata.ArtifactName)"

$packages = &$FindArtifactForApiReviewFn $ArtifactPath $packageMetadata.ArtifactName

if ($packages)
{
$pkgPath = $packages.Values[0]
$isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $artifact.name
Write-Host "Is API change detect required for $($artifact.name):$($isRequired)"
$isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.ArtifactName)
Write-Host "Is API change detect required for $($packages.ArtifactName):$($isRequired)"
if ($isRequired -eq $True)
{
$filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/")
$respCode = Submit-Request -filePath $filePath -packageName $artifact.name
$respCode = Submit-Request -filePath $filePath -packageName $($packageMetadata.ArtifactName)
if ($respCode -ne '200')
{
$responses[$artifact.name] = $respCode
$responses[$($packageMetadata.ArtifactName)] = $respCode
}
}
else
{
Write-Host "Pull request does not have any change for $($artifact.name). Skipping API change detect."
Write-Host "Pull request does not have any change for $($packageMetadata.ArtifactName)). Skipping API change detect."
}
}
else
{
Write-Host "No package is found in artifact path to find API changes for $($artifact.name)"
Write-Host "No package is found in artifact path to find API changes for $($packageMetadata.ArtifactName)"
}
}

Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/Generate-PR-Diff.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Param (
[string] $TargetPath
)

. (Join-Path $PSScriptRoot "Helpers" git-helpers.ps1)
. (Join-Path $PSScriptRoot "Helpers" "git-helpers.ps1")

function Get-ChangedServices {
Param (
[Parameter(Mandatory=$True)]
[string[]] $ChangedFiles
)

$changedServices = $ChangedFiles | Foreach-Object { if ($_ -match "sdk/([^/]+)") { $matches[1] } } | Sort-Object -Unique

return $changedServices
Expand Down
Loading