Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
889e025
update comment (#4364)
gearama Feb 21, 2023
9572608
Docker comment (#4375)
gearama Feb 21, 2023
5058f15
Trigger`keyvault` on proxy changes (#4343)
scbedd Feb 21, 2023
7da07d5
Generate API review for C++ using new parser (#4302)
praveenkuttappan Feb 21, 2023
f45d8f6
Add vmImage back to common perf.yml - Fixes #5466 - Partially reverts…
azure-sdk Feb 21, 2023
1849597
Fix pipelines path (#4358)
gearama Feb 22, 2023
395e9a0
Test proxy & storage tests improvements (#4241)
Jinming-Hu Feb 22, 2023
78eabdc
Temporarily pin Node 18 to 18.13.0 - Fixes #5536 (#4378)
azure-sdk Feb 22, 2023
737037d
Storage tests improvement (#4382)
Jinming-Hu Feb 23, 2023
365966d
Update CODEOWNERS (#4380)
Jinming-Hu Feb 23, 2023
8cd4ecb
show headers and query parameters in storage CI pipeline (#4379)
Jinming-Hu Feb 23, 2023
77a849f
Sync eng/common directory with azure-sdk-tools for PR 5431 #2501
azure-sdk Feb 23, 2023
1df70cb
Sync eng/common directory with azure-sdk-tools for PR 5562 (#4384)
azure-sdk Feb 24, 2023
71a7cfb
Fix Share Client failure #4377 (#4381)
microzchang Feb 24, 2023
5059347
decrease request count to avoid throttling errors for storage tests (…
Jinming-Hu Feb 24, 2023
1270731
Sync eng/common directory with azure-sdk-tools for PR 5568 (#4387)
azure-sdk Feb 24, 2023
e2a1b99
Add support to ignore invalid cert common name (#4361)
Jinming-Hu Feb 25, 2023
e48cf92
update to version 7.4 for admin. update tests (#4388)
gearama Feb 27, 2023
4ab6a41
update proxy version to include Info/Active against individual sessio…
azure-sdk Mar 1, 2023
4c22ce6
Sync eng/common directory with azure-sdk-tools for PR 5540 (#4396)
azure-sdk Mar 1, 2023
c8b028d
Follow-up to update changelog to reflect community contribution (#4393)
ahsonkhan Mar 2, 2023
ecb5f3d
logging api post request body (#4404)
azure-sdk Mar 2, 2023
ab7b238
Sync eng/common directory with azure-sdk-tools for PR 5595 (#4400)
azure-sdk Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/sdk/keyvault/ @vhvb1989 @gearama @antkmsft @rickwinter

# PRLabel: %Storage
/sdk/storage/ @vinjiang @katmsft @Jinming-Hu @EmmaZhu @antkmsft @vhvb1989 @gearama @LarryOsterman @microzchang
/sdk/storage/ @vinjiang @Jinming-Hu @EmmaZhu @antkmsft @vhvb1989 @gearama @LarryOsterman @microzchang

# PRLabel: %EngSys
/sdk/template/ @danieljurek @weshaggard @LarryOsterman @RickWinter
Expand Down
2 changes: 1 addition & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1",
"version": "0.2",
"language": "en",
"languageId": "cpp",
"dictionaries": [
Expand Down
13 changes: 13 additions & 0 deletions eng/common/pipelines/templates/jobs/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ parameters:
- name: LinuxPool
type: string
default: 'azsdk-pool-mms-ubuntu-2204-perf'
- name: LinuxVmImage
type: string
default: 'ubuntu-22.04'
- name: WindowsPool
type: string
default: 'azsdk-pool-mms-win-2022-perf'
- name: WindowsVmImage
type: string
default: 'windows-2022'
- name: Language
type: string
default: ''
Expand Down Expand Up @@ -68,10 +74,12 @@ jobs:
${{ if contains(parameters.OperatingSystems, 'Linux') }}:
Linux:
Pool: ${{ parameters.LinuxPool }}
OsVmImage: ${{ parameters.LinuxVmImage }}
MatrixName: 'Linux'
${{ if contains(parameters.OperatingSystems, 'Windows') }}:
Windows:
Pool: ${{ parameters.WindowsPool }}
OsVmImage: ${{ parameters.WindowsVmImage }}
MatrixName: 'Windows'
variables:
- ${{ parameters.Variables }}
Expand All @@ -82,6 +90,7 @@ jobs:
value: ''
pool:
name: $(Pool)
vmImage: $(OSVmImage)
steps:

- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
Expand All @@ -100,6 +109,10 @@ jobs:
Commitish: ${{ parameters.ToolsRepoCommitish }}
WorkingDirectory: $(System.DefaultWorkingDirectory)/azure-sdk-tools

- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
parameters:
AgentImage: $(OSVmImage)

- ${{ parameters.InstallLanguageSteps }}

- template: /eng/common/TestResources/deploy-test-resources.yml
Expand Down
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ steps:
- task: NodeTool@0
condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true'))
inputs:
versionSpec: 18.x
displayName: Use Node.js 18.x
versionSpec: 18.13.0
displayName: Use Node.js 18.13.0

- task: PowerShell@2
displayName: Check spelling (cspell)
Expand Down
10 changes: 9 additions & 1 deletion eng/common/scripts/Cadl-Project-Generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
param (
[Parameter(Position=0)]
[ValidateNotNullOrEmpty()]
[string] $ProjectDirectory
[string] $ProjectDirectory,
[Parameter(Position=1)]
[string] $CadlAdditionalOptions ## addtional cadl emitter options, separated by semicolon if more than one, e.g. option1=value1;option2=value2
)

$ErrorActionPreference = "Stop"
Expand Down Expand Up @@ -78,6 +80,12 @@ try {
}
}
$cadlCompileCommand = "npx cadl compile $mainCadlFile --emit $emitterName$emitterAdditionalOptions"
if ($CadlAdditionalOptions) {
$options = $CadlAdditionalOptions.Split(";");
foreach ($option in $options) {
$cadlCompileCommand += " --option $emitterName.$option"
}
}
Write-Host($cadlCompileCommand)
Invoke-Expression $cadlCompileCommand

Expand Down
3 changes: 3 additions & 0 deletions eng/common/scripts/artifact-metadata-parsing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ function CreateReleases($pkgList, $releaseApiUrl, $releaseSha) {
body = $releaseNotes
}

Write-Host "Post Request Body:"
Write-Host $body

$headers = @{
"Content-Type" = "application/json"
"Authorization" = "token $($env:GH_TOKEN)"
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/get-codeowners.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ param (
# but not this one:
# Remove the obsolete, prefix-based CODEOWNERS matcher & related tests
# https://github.com/Azure/azure-sdk-tools/pull/5431
[string]$ToolVersion = "1.0.0-dev.20230214.3",
[string]$ToolVersion = "1.0.0-dev.20230223.4",
[string]$ToolPath = (Join-Path ([System.IO.Path]::GetTempPath()) "codeowners-tool-path"),
[string]$DevOpsFeed = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json",
[string]$VsoVariable = "",
Expand Down Expand Up @@ -168,7 +168,7 @@ if ($Test) {
$azSdkToolsCodeowners = (Resolve-Path "$PSScriptRoot/../../../.github/CODEOWNERS")
TestGetCodeowners -targetPath "eng/common/scripts/get-codeowners.ps1" -codeownersFileLocation $azSdkToolsCodeowners -includeNonUserAliases $true -expectReturn @("konrad-jamrozik", "weshaggard", "benbp")

$testCodeowners = (Resolve-Path "$PSScriptRoot/../../../tools/code-owners-parser/Azure.Sdk.Tools.RetrieveCodeOwners.Tests/TestData/glob_path_CODEOWNERS")
$testCodeowners = (Resolve-Path "$PSScriptRoot/../../../tools/code-owners-parser/Azure.Sdk.Tools.RetrieveCodeOwners.Tests/TestData/test_CODEOWNERS")
TestGetCodeowners -targetPath "tools/code-owners-parser/Azure.Sdk.Tools.RetrieveCodeOwners.Tests/TestData/InputDir/a.txt" -codeownersFileLocation $testCodeowners -includeNonUserAliases $true -expectReturn @("2star")
exit 0
}
Expand Down
6 changes: 2 additions & 4 deletions eng/common/spelling/Invoke-Cspell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ created in the temp folder, package*.json files will be placed in that folder.
.PARAMETER LeavePackageInstallCache
If set the PackageInstallCache will not be deleted. Use if there are multiple
calls to Invoke-Cspell.ps1 to prevent creating multiple working directories and
redundant calls `npm install`.
redundant calls `npm ci`.

.PARAMETER Test
Run test functions against the script logic
Expand Down Expand Up @@ -167,9 +167,7 @@ $originalLocation = Get-Location

try {
Set-Location $PackageInstallCache
npm install npx | Out-Null
npm install cspell | Out-Null
npm install | Out-Null
npm ci | Write-Host

# Use the mutated configuration file when calling cspell
$command = "npx cspell $JobType --config $CSpellConfigPath --no-must-find-files --root $SpellCheckRoot --relative"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/testproxy/target_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-dev.20230201.10
1.0.0-dev.20230224.5
8 changes: 4 additions & 4 deletions eng/common/testproxy/transition-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ You will not be able to clean them up however. There exists [planned work](https
- `language` repo - An individual language repository eg. azure-sdk-for-python or azure-sdk-for-net etc.
- `assets` repo - The repository where assets are being moved to. <https://github.com/Azure/azure-sdk-assets>

The `test-proxy` tool is integrated with the ability to automatically restore these assets. This process is kick-started by the presence of an `assets.json` alongside a dev's actual code. This means that while assets will be cloned down externally, the _map_ to those assets will be stored alongside the tests. Normally, it is recommended to create an `assets.json` under the path `sdk/<ServiceDirectory>`. However, more granular storage is also possible.
The `test-proxy` tool is integrated with the ability to automatically restore these assets. This process is kick-started by the presence of an `assets.json` alongside a dev's actual code. This means that while assets will be cloned down externally, the _map_ to those assets will be stored alongside the tests. Normally, it is recommended to create an `assets.json` under the path `sdk/<ServiceDirectory>/<package>`. More granular storage than on an individual package level is possible, but each language's test framework would need to support that on a case-by-case basis.

Service/Package-Level examples:
Examples of current assets.json locations:

- `sdk/storage/assets.json`
- `sdk/storage/azure-storage-file-datalake/assets.json`
- [`sdk/data/aztables/assets.json`](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/data/aztables/assets.json)
- [`sdk/keyvault/azure-keyvault-keys/assets.json`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-keys/assets.json)

The location of the actual test code is referred to as the `language repo`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if ($UseTestRepo) {
# 3. ios
$LangRecordingDirs = @{"cpp" = "recordings";
"go" = "recordings";
"java" = "session-records";
"java" = "src.*?session-records";
"js" = "recordings";
"net" = "SessionRecords";
"python" = "recordings";
Expand Down Expand Up @@ -321,8 +321,8 @@ Function Move-AssetsFromLangRepo {
)
$filter = $LangRecordingDirs[$language]
Write-Host "Language recording directory name=$filter"
Write-Host "Get-ChildItem -Recurse -Filter ""*.json"" | Where-Object { `$_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains ""$filter"" }"
$filesToMove = Get-ChildItem -Recurse -Filter "*.json" | Where-Object { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains "$filter" }
Write-Host "Get-ChildItem -Recurse -Filter ""*.json"" | Where-Object { if ($filter.Contains(""*"")) { $_.DirectoryName -match $filter } else { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains ""$filter"" }"
$filesToMove = Get-ChildItem -Recurse -Filter "*.json" | Where-Object { if ($filter.Contains("*")) { $_.DirectoryName -match $filter } else { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains "$filter" } }
[string] $currentDir = Get-Location

foreach ($fromFile in $filesToMove) {
Expand Down
19 changes: 19 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# cSpell:ignore vsts
# cSpell:ignore parseazuresdkcpp

parameters:
- name: Artifacts
type: object
Expand Down Expand Up @@ -84,6 +87,20 @@ jobs:

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml

- task: UniversalPackages@0
displayName: Download ApiView Parser.
inputs:
command: download
vstsFeed: 'internal/AzureSDKForCpp'
vstsFeedPackage: 'parseazuresdkcpp'
downloadDirectory: '$(System.DefaultWorkingDirectory)/parser'
vstsPackageVersion: 0.6.0
condition: >-
and(
succeeded(),
ne(variables['Skip.CreateApiReview'], 'true'),eq(variables['System.TeamProject'], 'internal')
)

- task: Powershell@2
inputs:
filePath: $(System.DefaultWorkingDirectory)/eng/scripts/Create-APIReview.ps1
Expand All @@ -96,6 +113,8 @@ jobs:
-SourceBranch $(Build.SourceBranchName)
-DefaultBranch $(DefaultBranch)
-ConfigFileDir $(Build.ArtifactStagingDirectory)/PackageInfo
-ParserPath $(System.DefaultWorkingDirectory)/parser/RelWithDebInfo/ParseAzureSdkCpp.exe
-SourcePath $(Build.SourcesDirectory)/sdk/${{ parameters.ServiceDirectory }}/${{ artifact.name }}/inc
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Create API Review for ${{ artifact.name }}
Expand Down
33 changes: 17 additions & 16 deletions eng/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,31 @@ Param(
[Parameter(Mandatory=$True)]
[string] $DefaultBranch,
[Parameter(Mandatory=$True)]
[string] $ConfigFileDir
[string] $ConfigFileDir,
[Parameter(Mandatory=$True)]
[string] $ParserPath,
[Parameter(Mandatory=$True)]
[string] $SourcePath
)

Write-Host "$PSScriptRoot"
. (Join-Path $PSScriptRoot .. common scripts common.ps1)
$createReviewScript = (Join-Path $PSScriptRoot .. common scripts Create-APIReview.ps1)
Set-Location $PSScriptRoot

Write-Host "Creating API review artifact for $ArtifactName"
New-Item -ItemType Directory -Path $OutPath/$ArtifactName -force
$apiviewSettings = Join-Path $SourcePath "ApiViewSettings.json"
if (!(Test-Path $apiviewSettings))
{
Write-Host "ApiViewSettings.json file is not found in $($SourcePath). APIView settings file is required to generate API review file."
exit 1
}

$gitroot = Join-Path $PSScriptRoot .. ..
Write-Host "Get-ApiViewCommandLine.ps1 $gitroot $ArtifactName"
$cmdLine = & $PSScriptRoot/Get-ApiViewCommandLine.ps1 $gitroot $ArtifactName
Write-Host "Executing clang++ command:"
Write-Host $cmdLine
$cmd, $cmdArgs = $cmdLine -split ' '
# Get-ApiViewCommandLine.ps1 returns a string representing a clang++ command that needs to be run, e.g.
# clang++ <space separated list of header files> -Xclang -ast-dump -I <space separated list of header files>
# ApiView expects a zip of this ast as the format for a C++ language artifact.
& $cmd $cmdArgs > clangAstOutput
Write-Host "Creating API review artifact for $($ArtifactName)"
New-Item -ItemType Directory -Path $OutPath/$ArtifactName -force
$parentPath = Split-Path $ParserPath -Parent
Write-Host "Contents in $($parentPath)"
Get-ChildItem -Path $parentPath -Recurse

Compress-Archive -Path clangAstOutput -DestinationPath $OutPath/$ArtifactName/$ArtifactName
Rename-Item $OutPath/$ArtifactName/$ArtifactName.zip -NewName "$ArtifactName.cppast"
& $ParserPath -o $OutPath/$ArtifactName/$ArtifactName.json $SourcePath

Write-Host "Send request to APIView to create review for $ArtifactName"
&($createReviewScript) -ArtifactPath $OutPath -APIViewUri $ApiviewUri -APIKey $ApiKey -APILabel $ApiLabel -PackageName $ArtifactName -SourceBranch $SourceBranch -DefaultBranch $DefaultBranch -ConfigFileDir $ConfigFileDir
2 changes: 1 addition & 1 deletion eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseD

function Find-cpp-Artifacts-For-Apireview($ArtifactPath, $PackageName)
{
$artifact = Get-ChildItem -Path (Join-Path $ArtifactPath $PackageName) -Filter "*.cppast"
$artifact = Get-ChildItem -Path (Join-Path $ArtifactPath $PackageName) -Filter "*.json"
if ($artifact)
{
$packages = @{
Expand Down
2 changes: 1 addition & 1 deletion sdk/attestation/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "cpp",
"TagPrefix": "cpp/attestation",
"Tag": "cpp/attestation_10abfdc3e0"
"Tag": "cpp/attestation_6398169251"
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace Test {

TEST_F(CertificateTests, AddPolicyManagementCertificate_LIVEONLY_)
{
CHECK_SKIP_TEST()

auto adminClient(CreateClient(ServiceInstanceType::Isolated));

auto isolatedCertificateBase64(GetEnv("ISOLATED_SIGNING_CERTIFICATE"));
Expand Down Expand Up @@ -233,8 +231,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace Test {

TEST_F(CertificateTests, RemovePolicyManagementCertificate_LIVEONLY_)
{
CHECK_SKIP_TEST()

auto adminClient(CreateClient(ServiceInstanceType::Isolated));

auto isolatedCertificateBase64(GetEnv("ISOLATED_SIGNING_CERTIFICATE"));
Expand Down
Loading