Skip to content

Commit

Permalink
Merge branch 'main' into feature/app-config-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaperalta authored Jan 27, 2025
2 parents 3651810 + f8e9067 commit 20ea20d
Show file tree
Hide file tree
Showing 238 changed files with 5,703 additions and 223 deletions.
2 changes: 1 addition & 1 deletion dev/cognitiveservices/data-plane/Language/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
```
1 change: 0 additions & 1 deletion documentation/ci-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ If you have an issue or with any of checks listed in the first column of the tab
| `SDK azure-sdk-for-java` | Weidong Xu | [weidongxu-microsoft](https://github.com/weidongxu-microsoft) |
| `SDK azure-sdk-for-js` | Qiaoqiao Zhang | [qiaozha](https://github.com/qiaozha) |
| `SDK azure-sdk-for-net` | Wei Hu | [live1206](https://github.com/live1206) |
| `SDK azure-sdk-for-net-track2` | Wei Hu | [live1206](https://github.com/live1206) |
| `SDK azure-sdk-for-python` | Yuchao Yan | [msyyc](https://github.com/msyyc) |

Do the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ swagger-to-sdk:
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
```
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ swagger-to-sdk:
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
```
5 changes: 4 additions & 1 deletion eng/common/pipelines/templates/steps/sparse-checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ steps:
# Set non-cone mode otherwise path filters will not work in git >= 2.37.0
# See https://github.blog/2022-06-27-highlights-from-git-2-37/#tidbits
git sparse-checkout set --no-cone '/*' '!/*/' '/eng'
# '/*' '!/*/' -> only checkout files in top level directory
# '/eng' -> checkout required eng/ scripts/configs
# '.config' -> required for files like .config/1espt/PipelineAutobaseliningConfig.yml and .config/guardian/.gdnbaselines used by 1es PT scripts
git sparse-checkout set --no-cone '/*' '!/*/' '/eng' '/.config'
}
# Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*')
Expand Down
1 change: 1 addition & 0 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ param(
[string]$DeployId,
[switch]$SkipLogin,
[string]$Subscription,
[string]$Tenant,

# Default to true in Azure Pipelines environments
[switch] $CI = ($null -ne $env:SYSTEM_TEAMPROJECTID),
Expand Down
15 changes: 9 additions & 6 deletions eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ function RunOrExitOnFailure()
}
}

function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushImages)
function Login([string]$subscription, [string]$tenant, [string]$clusterGroup, [switch]$skipPushImages)
{
Write-Host "Logging in to subscription, cluster and container registry"
az account show -s "$subscription" *> $null
if ($LASTEXITCODE) {
RunOrExitOnFailure az login --allow-no-subscriptions
RunOrExitOnFailure az login --allow-no-subscriptions --tenant $tenant
}

# Discover cluster name, only one cluster per group is expected
Expand Down Expand Up @@ -116,24 +116,27 @@ function DeployStressTests(
}
$clusterGroup = 'rg-stress-cluster-pg'
$subscription = 'Azure SDK Developer Playground'
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
} elseif ($environment -eq 'prod') {
if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'prod' environment."
}
$clusterGroup = 'rg-stress-cluster-prod'
$subscription = 'Azure SDK Test Resources - TME'
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
} elseif ($environment -eq 'storage') {
if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment."
}
$clusterGroup = 'rg-stress-cluster-storage'
$subscription = 'XClient'
} elseif (!$clusterGroup -or !$subscription) {
throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
$subscription = 'Azure SDK Test Resources - TME'
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
} elseif (!$clusterGroup -or !$subscription -or $tenant) {
throw "-ClusterGroup, -Subscription and -Tenant parameters must be specified when deploying to an environment that is not pg or prod."
}

if (!$skipLogin) {
Login -subscription $subscription -clusterGroup $clusterGroup -skipPushImages:$skipPushImages
Login -subscription $subscription -tenant $tenant -clusterGroup $clusterGroup -skipPushImages:$skipPushImages
}

$chartRepoName = 'stress-test-charts'
Expand Down
66 changes: 58 additions & 8 deletions eng/scripts/Create-APIView.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ function Get-ResourceProviderFromReadMePath {
return $null
}

function Get-ImpactedTypespecProjects {
param (
[Parameter(Mandatory = $true)]
[string]$TypeSpecFile
)
$it = $TypeSpecFile
while ($it -and !$configFilesInTypeSpecProjects) {
$it = Split-Path -Parent $it
$configFilesInTypeSpecProjects = Get-ChildItem -Path $it -File "tspconfig.yaml"
}

if ($configFilesInTypeSpecProjects) {
foreach($configFilesInTypeSpecProject in $configFilesInTypeSpecProjects) {
$maintsp = Get-ChildItem -Path $($configFilesInTypeSpecProject.Directory.FullName) -File "main.tsp"
$clienttsp = Get-ChildItem -Path $($configFilesInTypeSpecProject.Directory.FullName) -File "client.tsp"
$entryPointFile = $maintsp ? $maintsp : $clienttsp
if ($entryPointFile) {
Write-Host "Found $($configFilesInTypeSpecProject.Name) and $($entryPointFile.Name) in directory $($configFilesInTypeSpecProject.Directory.FullName)"
return $configFilesInTypeSpecProject.Directory.FullName
}
else {
Write-Host "Did not find main.tsp nor client.tsp in directory $($configFilesInTypeSpecProject.Directory.FullName)"
}
}
}
}

<#
.DESCRIPTION
Invoke the swagger parset to generate APIView tokens.
Expand Down Expand Up @@ -366,12 +393,30 @@ function New-TypeSpecAPIViewTokens {
$SourceCommitId = $(git rev-parse HEAD^2)
$TargetCommitId = $(git rev-parse HEAD^1)

$typeSpecProjects, $null = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" `
-IgnoreCoreFiles:$true `
-BaseCommitish:$SourceCommitId `
-TargetCommitish:$TargetCommitId
LogInfo " Getting changed TypeSpec files in PR, between $SourceCommitId and $TargetCommitId"
$changedFiles = Get-ChangedFiles
$changedTypeSpecFiles = Get-ChangedTypeSpecFiles -changedFiles $changedFiles

if ($changedTypeSpecFiles.Count -eq 0) {
LogWarning " There are no changes to TypeSpec files in the current PR..."
Write-Host "##vso[task.complete result=SucceededWithIssues;]DONE"
exit 0
}

$typeSpecProjects = $typeSpecProjects | Where-Object {Test-Path -Path "$_/main.tsp"}
LogGroupStart " Pullrequest has changes in these TypeSpec files..."
$changedTypeSpecFiles | ForEach-Object {
LogInfo " - $_"
}
LogGroupEnd

# Get impacted TypeSpec projects
$typeSpecProjects = [System.Collections.Generic.HashSet[string]]::new()
$changedTypeSpecFiles | ForEach-Object {
$tspProj = Get-ImpactedTypespecProjects -TypeSpecFile "$_"
if ($tspProj) {
$typeSpecProjects.Add($tspProj) | Out-Null
}
}

LogGroupStart " TypeSpec APIView Tokens will be generated for the following configuration files..."
$typeSpecProjects | ForEach-Object {
Expand All @@ -391,25 +436,30 @@ function New-TypeSpecAPIViewTokens {
git checkout $SourceCommitId
Write-Host "Installing required dependencies to generate New API review"
npm ci
LogGroupStart "npm ls -a"
npm ls -a
LogGroupEnd
foreach ($typeSpecProject in $typeSpecProjects) {
$tokenDirectory = [System.IO.Path]::Combine($typeSpecAPIViewArtifactsDirectory, $typeSpecProject.split([IO.Path]::DirectorySeparatorChar)[-1])
$tokenDirectory = Join-Path $typeSpecAPIViewArtifactsDirectory $(Split-Path $typeSpecProject -Leaf)
New-Item -ItemType Directory -Path $tokenDirectory -Force | Out-Null
Invoke-TypeSpecAPIViewParser -Type "New" -ProjectPath $typeSpecProject -ResourceProvider $($typeSpecProject.split([IO.Path]::DirectorySeparatorChar)[-1]) -TokenDirectory $tokenDirectory
Invoke-TypeSpecAPIViewParser -Type "New" -ProjectPath $typeSpecProject -ResourceProvider $(Split-Path $typeSpecProject -Leaf) -TokenDirectory $tokenDirectory
}

# Generate Baseline TypeSpec APIView Tokens
git checkout $TargetCommitId
Write-Host "Installing required dependencies to generate Baseline API review"
npm ci
LogGroupStart "npm ls -a"
npm ls -a
LogGroupEnd
foreach ($typeSpecProject in $typeSpecProjects) {
# Skip Baseline APIView Token for new projects
if (!(Test-Path -Path $typeSpecProject)) {
Write-Host "TypeSpec project $typeSpecProject is not found in pull request target branch. API review will not have a baseline revision."
}
else {
Invoke-TypeSpecAPIViewParser -Type "Baseline" -ProjectPath $typeSpecProject -ResourceProvider $($typeSpecProject.split([IO.Path]::DirectorySeparatorChar)[-1]) -TokenDirectory $tokenDirectory | Out-Null
$tokenDirectory = Join-Path $typeSpecAPIViewArtifactsDirectory $(Split-Path $typeSpecProject -Leaf)
Invoke-TypeSpecAPIViewParser -Type "Baseline" -ProjectPath $typeSpecProject -ResourceProvider $(Split-Path $typeSpecProject -Leaf) -TokenDirectory $tokenDirectory | Out-Null
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion specification/advisor/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/alertsmanagement/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-libraries-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/apicenter/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ swagger-to-sdk:
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
```

### Suppressions
Expand Down
2 changes: 1 addition & 1 deletion specification/apimanagement/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-go
- repo: azure-sdk-for-python
- repo: azure-sdk-for-js
Expand Down
2 changes: 1 addition & 1 deletion specification/app/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ swagger-to-sdk:
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
```
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ swagger-to-sdk:
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-resource-manager-schemas
- repo: azure-cli-extensions
```
Expand Down
2 changes: 1 addition & 1 deletion specification/appconfiguration/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-python
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-java
- repo: azure-sdk-for-js
- repo: azure-sdk-for-go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/appplatform/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ swagger-to-sdk:
- repo: azure-powershell
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-node
- repo: azure-sdk-for-js
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/attestation/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
```

## Python
Expand Down
2 changes: 1 addition & 1 deletion specification/attestation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down
2 changes: 1 addition & 1 deletion specification/authorization/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/automanage/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down
2 changes: 1 addition & 1 deletion specification/automation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down
2 changes: 1 addition & 1 deletion specification/azure-kusto/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-js
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/azurefleet/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This is not used by Autorest itself.

```yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/batch/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/billing/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ This is not used by Autorest itself.

```yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/blueprint/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
- repo: azure-sdk-for-python
Expand Down
2 changes: 1 addition & 1 deletion specification/botservice/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python
- repo: azure-sdk-for-go
Expand Down
2 changes: 1 addition & 1 deletion specification/cdn/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ swagger-to-sdk:
- repo: azure-sdk-for-python
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-js
- repo: azure-sdk-for-node
- repo: azure-sdk-for-ruby
Expand Down
2 changes: 1 addition & 1 deletion specification/codesigning/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ swagger-to-sdk:
- repo: azure-sdk-for-python
- repo: azure-cli-extensions
- repo: azure-sdk-for-go
- repo: azure-sdk-for-net-track2
- repo: azure-sdk-for-net
- repo: azure-sdk-for-java
- repo: azure-sdk-for-js
- repo: azure-sdk-for-typescript
Expand Down
Loading

0 comments on commit 20ea20d

Please sign in to comment.