Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into upgrade_sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
zedy committed Sep 27, 2024
2 parents 4b0e647 + c7f2cc0 commit 7c5ec01
Show file tree
Hide file tree
Showing 192 changed files with 11,372 additions and 987 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/azure-sdk-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test Azure SDK Tools

on:
workflow_dispatch:
pull_request:
branches: [ main ]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# todo before checkin: multiplex to include running tests on py38 -> 312
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install azure-sdk-tools
run: |
python -m pip install -e tools/azure-sdk-tools[build,ghtools]
python -m pip freeze
shell: bash

- name: Run tests
run: |
pytest ./tests
shell: bash
working-directory: tools/azure-sdk-tools
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ sdk/storage/azure-storage-blob-changefeed/tests/settings/settings_real.py
!sdk/ml/azure-ai-ml/tests/test_configs/*/*/environment*
!sdk/ml/azure-ai-ml/tests/environment*

# azure-ai-evaluation connections file
sdk/evaluation/azure-ai-evaluation/connections.json


# The locations below are deprecated - keep to prevent any accidental secrets leakage ==========
sdk/storage/azure-storage-blob/tests/_shared/settings_real.py
Expand Down
3 changes: 2 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"conda/conda-recipes/msal-extensions/meta.yaml",
"conda/conda-recipes/msrest/meta.yaml",
"conda/conda-recipes/uamqp/meta.yaml",
"conda/conda-releaselogs/azure-mgmt.md"
"conda/conda-releaselogs/azure-mgmt.md",
".github/workflows/azure-sdk-tools.yml"
],
"words": [
"msedge",
Expand Down
2 changes: 1 addition & 1 deletion eng/common/pipelines/codeowners-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stages:
vmImage: ubuntu-22.04

variables:
CodeownersLinterVersion: '1.0.0-dev.20240917.2'
CodeownersLinterVersion: '1.0.0-dev.20240926.2'
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"
TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"
Expand Down
6 changes: 3 additions & 3 deletions eng/common/scripts/Update-DocsMsPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function GetMetadata($moniker) {
return $metadata
}

function ValidatePackageForOnboarding2($package) {
function PackageIsValidForDocsOnboarding($package) {
if (!(Test-Path "Function:$ValidateDocsMsPackagesFn")) {
return $true
}
Expand Down Expand Up @@ -88,7 +88,7 @@ foreach ($moniker in $MONIKERS) {
if ($package.ContainsKey('_SkipDocsValidation') -and $true -eq $package['_SkipDocsValidation']) {
Write-Host "Skip validation for package: $($packageIdentity)"
}
elseif (!(ValidatePackageForOnboarding2 $package)) {
elseif (!(PackageIsValidForDocsOnboarding $package)) {
LogWarning "Skip adding package that did not pass validation: $($packageIdentity)"
continue
}
Expand All @@ -101,7 +101,7 @@ foreach ($moniker in $MONIKERS) {
$oldPackage = $alreadyOnboardedPackages[$packageIdentity]

if ($oldPackage.Version -ne $package.Version) {
if (!(ValidatePackageForOnboarding2 $package)) {
if (!(PackageIsValidForDocsOnboarding $package)) {
LogWarning "Omitting package that failed validation: $($packageIdentity)@$($package.Version)"
continue
}
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
IncludeIndirect: false
IncludeIndirect: true

- template: /eng/pipelines/templates/steps/build-extended-artifacts.yml
parameters:
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
IncludeIndirect: false
IncludeIndirect: true

- template: ../steps/build-extended-artifacts.yml
parameters:
Expand Down
20 changes: 11 additions & 9 deletions eng/pipelines/templates/steps/resolve-package-targeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ steps:
$setting = "$(BuildTargetingString)"
}
else {
if ("${{ parameters.IncludeIndirect }}" -eq "true") {
$packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}/*.json" `
if (Test-Path "${{ parameters.PackagePropertiesFolder }}") {
if ("${{ parameters.IncludeIndirect }}" -eq "true") {
$packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}/*.json" `
| ForEach-Object { $_.Name.Replace(".json", "") }
}
else {
$packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}/*.json" `
| Where-Object { (Get-Content -Raw $_ | ConvertFrom-Json).IncludedForValidation -eq $false } `
| ForEach-Object { $_.Name.Replace(".json", "") }
}
else {
$packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}/*.json" `
| Where-Object { (Get-Content -Raw $_ | ConvertFrom-Json).IncludedForValidation -eq $false } `
| ForEach-Object { $_.Name.Replace(".json", "") }
}
}
$setting = $packageProperties -join ","
$setting = $packageProperties -join ","
}
}
Write-Host "##vso[task.setvariable variable=TargetingString;]$setting"
Expand Down
Loading

0 comments on commit 7c5ec01

Please sign in to comment.