Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[Rr]eleases/
x64/
x86/
bld/
bld*/
[Bb]in/
[Oo]bj/
[Ll]og/
Expand Down
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"*.exe",
"*.a",
"*.lib",
"*.yaml",
"**/libcurl-stress-test/README.md",
".github/CODEOWNERS",
".gitignore",
".vscode/cspell.json",
Expand Down
142 changes: 142 additions & 0 deletions eng/common/pipelines/templates/jobs/perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
parameters:
- name: Variables
type: object
default: []
- name: OperatingSystems
type: string
default: 'Linux'
- name: Language
type: string
default: ''
- name: InstallLanguageSteps
type: stepList
default: []
- name: ServiceDirectory
type: string
default: ''
- name: Services
type: string
default: ''
- name: PackageVersions
type: string
default: '.*'
- name: Tests
type: string
default: '.*'
- name: Arguments
type: string
default: '.*'
- name: Iterations
type: number
default: '5'
- name: AdditionalArguments
type: string
default: ''
- name: EnvVars
type: object
default: {}

resources:
repositories:
- repository: azure-sdk-tools
type: github
endpoint: Azure
name: Azure/azure-sdk-tools
ref: main

variables:
- ${{ parameters.Variables }}

jobs:
- job: Perf
timeoutInMinutes: 360
strategy:
matrix:
${{ if contains(parameters.OperatingSystems, 'Linux') }}:
Linux:
Pool: 'azsdk-pool-mms-ubuntu-2004-perf'
OsVmImage: 'MMSUbuntu20.04'
MatrixName: 'Linux'
${{ if contains(parameters.OperatingSystems, 'Windows') }}:
Windows:
Pool: 'azsdk-pool-mms-win-2019-perf'
OsVmImage: 'MMS2019'
MatrixName: 'Windows'
pool:
name: $(Pool)
vmImage: $(OSVmImage)
steps:
- checkout: self
path: s

- checkout: azure-sdk-tools
path: s/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
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Location: westus
ResourceType: perf

- pwsh: |
set-content -path config.yml -value "WorkingDirectories:"
add-content -path config.yml -value " ${{ parameters.Language }}: $(Agent.BuildDirectory)/s"
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
displayName: Create config.yml

- script: >-
dotnet run -- run
--no-sync
--languages ${{ parameters.Language }}
--services "${{ parameters.Services }}"
--package-versions "${{ parameters.PackageVersions }}"
--tests "${{ parameters.Tests }}"
--arguments "${{ parameters.Arguments }}"
--iterations ${{ parameters.Iterations }}
${{ parameters.AdditionalArguments }}
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
env:
${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }}
displayName: Run perf tests

- pwsh: |
get-content results.txt
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
displayName: Print results.txt
condition: always()

- pwsh: |
get-content results.csv
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
displayName: Print results.csv
condition: always()

- pwsh: |
get-content results.md
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
displayName: Print results.md
condition: always()

- pwsh: |
get-content results.json
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
displayName: Print results.json
condition: always()

- task: PublishPipelineArtifact@1
inputs:
targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results
artifactName: results-$(MatrixName)
condition: always()

- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
ResourceType: perf
10 changes: 8 additions & 2 deletions eng/common/scripts/Detect-Api-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Submit-Request($filePath, $packageName)
if (!$repoName) {
$repoName = "azure/azure-sdk-for-$LanguageShort"
}
$reviewFileName = "$($packageName)_$($LanguageShort).json"
$query = [System.Web.HttpUtility]::ParseQueryString('')
$query.Add('artifactName', $ArtifactName)
$query.Add('buildId', $BuildId)
Expand All @@ -35,6 +36,12 @@ function Submit-Request($filePath, $packageName)
$query.Add('repoName', $repoName)
$query.Add('pullRequestNumber', $PullRequestNumber)
$query.Add('packageName', $packageName)
$query.Add('language', $LanguageShort)
$reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName
if (Test-Path $reviewFileFullName)
{
$query.Add('codeFile', $reviewFileName)
}
$uri = [System.UriBuilder]$APIViewUri
$uri.query = $query.toString()
Write-Host "Request URI: $($uri.Uri.OriginalString)"
Expand Down Expand Up @@ -65,7 +72,7 @@ function Should-Process-Package($pkgPath, $packageName)
# Get package info from json file created before updating version to daily dev
$pkgInfo = Get-Content $pkgPropPath | ConvertFrom-Json
$packagePath = $pkgInfo.DirectoryPath
$modifiedFiles = Get-ChangedFiles -DiffPath "$packagePath/*" -DiffFilterType ''
$modifiedFiles = @(Get-ChangedFiles -DiffPath "$packagePath/*" -DiffFilterType '')
$filteredFileCount = $modifiedFiles.Count
Write-Host "Number of modified files for package: $filteredFileCount"
return ($filteredFileCount -gt 0 -and $pkgInfo.IsNewSdk)
Expand All @@ -80,7 +87,6 @@ function Log-Input-Params()
Write-Host "Language: $($Language)"
Write-Host "Commit SHA: $($CommitSha)"
Write-Host "Repo Name: $($RepoFullName)"
Write-Host "Package Name: $($PackageName)"
}

Log-Input-Params
Expand Down
3 changes: 1 addition & 2 deletions eng/common/scripts/Helpers/Metadata-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ function GenerateDocsMsMetadata($originalMetadata, $language, $languageDisplayNa
"ms.service"= $msService
}
$updatedMetadata = compare-and-merge-metadata -original $originalMetadata -updated $metadataTable
return "---
$updatedMetadata---`r`n"
return "---`r`n$updatedMetadata---`r`n"
}

function ServiceLevelReadmeNameStyle($serviceName) {
Expand Down
16 changes: 6 additions & 10 deletions eng/common/scripts/Service-Level-Readme-Automation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ function update-metadata-table($readmeFolder, $readmeName, $serviceName, $msServ
$readmePath = Join-Path $readmeFolder -ChildPath $readmeName
$readmeContent = Get-Content -Path $readmePath -Raw
$match = $readmeContent -match "^---\n*(?<metadata>(.*\n?)*?)---\n*(?<content>(.*\n?)*)"
if (!$match) {
# $Language, $LanguageDisplayName are the variables globally defined in Language-Settings.ps1
$metadataString = GenerateDocsMsMetadata -language $Language -languageDisplayName $LanguageDisplayName -serviceName $serviceName `
-tenantId $TenantId -clientId $ClientId -clientSecret $ClientSecret `
-msService $msService
Set-Content -Path $readmePath -Value "$metadataString$readmeContent" -NoNewline
return
$restContent = $readmeContent
$metadata = ""
if ($match) {
$restContent = $Matches["content"].trim()
$metadata = $Matches["metadata"].trim()
}
$restContent = $Matches["content"].trim()
$metadata = $Matches["metadata"].trim()
# $Language, $LanguageDisplayName are the variables globally defined in Language-Settings.ps1
$metadataString = GenerateDocsMsMetadata -originalMetadata $metadata -language $Language -languageDisplayName $LanguageDisplayName -serviceName $serviceName `
-tenantId $TenantId -clientId $ClientId -clientSecret $ClientSecret `
Expand All @@ -98,7 +94,7 @@ function generate-markdown-table($readmeFolder, $readmeName, $packageInfo, $moni
$tableContent = ""
# Here is the table, the versioned value will
foreach ($pkg in $packageInfo) {
$repositoryLink = "$RepositoryUri/$($pkg.Package)"
$repositoryLink = "$PackageRepositoryUri/$($pkg.Package)"
if (Test-Path "Function:$GetRepositoryLinkFn") {
$repositoryLink = &$GetRepositoryLinkFn -packageInfo $pkg
}
Expand Down
7 changes: 4 additions & 3 deletions eng/common/scripts/Test-SampleMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ process {

Write-Error "File '$($file.FullName)' contains invalid product slug: $product" -TargetObject $file `
-Category InvalidData -CategoryTargetName $product -CategoryTargetType string `
-RecommendedAction 'Use only product slugs listed at https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=master#product'
-RecommendedAction 'Use only product slugs listed at https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#product'
}
}

Expand All @@ -95,7 +95,7 @@ end {
}

begin {
# https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=master#product
# https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#product
$productSlugs = @(
"ai-builder",
"aspnet",
Expand Down Expand Up @@ -358,6 +358,7 @@ begin {
"ef-core",
"ef6",
"expression-studio",
"language-service",
"m365-ems",
"m365-ems-cloud-app-security",
"m365-ems-configuration-manager",
Expand Down Expand Up @@ -498,7 +499,7 @@ Checks sample markdown files' frontmatter for invalid information.
.DESCRIPTION
Given a collection of markdown files, their frontmatter - if present - is checked for invalid information, including:

Invalid product slugs, i.e. those not listed in https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=master#product.
Invalid product slugs, i.e. those not listed in https://review.docs.microsoft.com/help/contribute/metadata-taxonomies?branch=main#product.

.PARAMETER Path
Specifies the path to an item to search. Wildcards are permitted.
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Update-DocsMsMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata

$foundTitle = ""
if ($ReadmeContent -match $TITLE_REGEX) {
$ReadmeContent = $ReadmeContent -replace $TITLE_REGEX, "`${0} - Version $($PackageInfo.Version) `n"
$ReadmeContent = $ReadmeContent -replace $TITLE_REGEX, "`${0} - version $($PackageInfo.Version) `n"
$foundTitle = $matches["filetitle"]
}

Expand Down
5 changes: 3 additions & 2 deletions eng/common/testproxy/test-proxy-docker.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
parameters:
rootFolder: '$(Build.SourcesDirectory)'
targetVersion: ''
templateRoot: '$(Build.SourcesDirectory)'

steps:
- pwsh: |
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1
displayName: 'Language Specific Certificate Trust'

- pwsh: |
docker info
displayName: 'Dump active docker information'

- pwsh: |
$(Build.SourcesDirectory)/eng/common/testproxy/docker-start-proxy.ps1 -Mode start -TargetFolder "${{ parameters.rootFolder }}" -VersionOverride="${{ parameters.targetVersion }}"
${{ parameters.templateRoot }}/eng/common/testproxy/docker-start-proxy.ps1 -Mode start -TargetFolder "${{ parameters.rootFolder }}" -VersionOverride="${{ parameters.targetVersion }}"
displayName: 'Run the docker container'

- pwsh: |
Expand Down
11 changes: 6 additions & 5 deletions eng/common/testproxy/test-proxy-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ parameters:
rootFolder: '$(Build.SourcesDirectory)'
runProxy: true
targetVersion: ''
templateRoot: '$(Build.SourcesDirectory)'

steps:
- pwsh: |
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1
displayName: 'Language Specific Certificate Trust'

- pwsh: |
$version = $(Get-Content "$(Build.SourcesDirectory)/eng/common/testproxy/target_version.txt" -Raw).Trim()
$version = $(Get-Content "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" -Raw).Trim()
$overrideVersion = "${{ parameters.targetVersion }}"

if($overrideVersion) {
Expand All @@ -29,21 +30,21 @@ steps:

- ${{ if eq(parameters.runProxy, 'true') }}:
- pwsh: |
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx"
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]${{ parameters.templateRoot }}/eng/common/testproxy/dotnet-devcert.pfx"
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true"
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables'

- pwsh: |
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.templateRoot }}/test-proxy.log
displayName: 'Run the testproxy - windows'
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))

# nohup does NOT continue beyond the current session if you use it within powershell
- bash: |
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log &
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > ${{ parameters.templateRoot }}/test-proxy.log &
displayName: "Run the testproxy - linux/mac"
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
workingDirectory: "${{ parameters.rootFolder }}"
Expand Down
16 changes: 7 additions & 9 deletions eng/pipelines/templates/stages/archetype-cpp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ stages:
- pwsh: |
$branchName = "azure-sdk-for-cpp-${{ artifact.Name }}-$(Build.BuildId)"
if ('$(VcpkgForkBranchName)') {
Write-Host "Using queue time branch name"
Write-Host "Using queue time branch name"
$branchName = '$(VcpkgForkBranchName)'
}
Write-Host "##vso[task.setvariable variable=PrBranchName]$branchName"
Expand Down Expand Up @@ -164,14 +164,12 @@ stages:
CommitMsg: Update vcpkg-configuration.json
BaseRepoBranch: $(DefaultBranch)

# Set $(HasChanges) to $true so that
# create-pull-request.yml completes the push and PR
# submission steps. This is contegnent upon
# `$(PublishToVcpkg)` being `true`. `$(PublishToVcpkg)` is
# set in `vcpkg-publish.yml`
- pwsh: Write-Host "##vso[task.setvariable variable=HasChanges]$true"
condition: and(succeeded(), eq(variables['PublishToVcpkg'], 'true'))
displayName: Set $(HasChanges) to $true for create-pull-request.yml
# Set $(HasChanges) to $(PublishToVcpkg) so that
# create-pull-request.yml creates or does not create a PR
# based on the deicision of the step that determines
# whether to publish to vcpkg.
- pwsh: Write-Host "##vso[task.setvariable variable=HasChanges]$(PublishToVcpkg)"
displayName: Set $(HasChanges) to $(PublishToVcpkg) for create-pull-request.yml

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(azure-core-cpp "1.5.0")
find_dependency(azure-core-cpp "1.7.0")
find_dependency(OpenSSL)

include("${CMAKE_CURRENT_LIST_DIR}/azure-security-attestation-cppTargets.cmake")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"name": "azure-core-cpp",
"default-features": false,
"version>=": "1.7.0-beta.1"
"version>=": "1.7.0"
},
{
"name": "vcpkg-cmake",
Expand Down
Loading