Merge main with WebSockets. (#3856)
Merge Main with feature/websockets branch. Co-authored-by: Ben Broderick Phillips <ben@benbp.net> Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: sima-zhu <sizhu@microsoft.com> Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com> Co-authored-by: Mike Harder <mharder@microsoft.com> Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> Co-authored-by: Daniel Jurek <djurek@microsoft.com> Co-authored-by: Heath Stewart <heaths@microsoft.com> Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> Co-authored-by: praveenkuttappan <prmarott@microsoft.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This commit is contained in:
parent
5cff286c0a
commit
94055dd047
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,7 +19,7 @@
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
bld*/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
2
.vscode/cspell.json
vendored
2
.vscode/cspell.json
vendored
@ -11,6 +11,8 @@
|
||||
"*.exe",
|
||||
"*.a",
|
||||
"*.lib",
|
||||
"*.yaml",
|
||||
"**/libcurl-stress-test/README.md",
|
||||
".github/CODEOWNERS",
|
||||
".gitignore",
|
||||
".vscode/cspell.json",
|
||||
|
||||
142
eng/common/pipelines/templates/jobs/perf.yml
Normal file
142
eng/common/pipelines/templates/jobs/perf.yml
Normal file
@ -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
|
||||
@ -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)
|
||||
@ -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)"
|
||||
@ -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)
|
||||
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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 `
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
@ -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",
|
||||
@ -358,6 +358,7 @@ begin {
|
||||
"ef-core",
|
||||
"ef6",
|
||||
"expression-studio",
|
||||
"language-service",
|
||||
"m365-ems",
|
||||
"m365-ems-cloud-app-security",
|
||||
"m365-ems-configuration-manager",
|
||||
@ -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.
|
||||
|
||||
@ -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"]
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
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: |
|
||||
@ -12,7 +13,7 @@ steps:
|
||||
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: |
|
||||
|
||||
@ -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) {
|
||||
@ -29,7 +30,7 @@ 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'
|
||||
@ -37,13 +38,13 @@ steps:
|
||||
- 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 }}"
|
||||
|
||||
@ -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"
|
||||
@ -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:
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
{
|
||||
"name": "azure-core-cpp",
|
||||
"default-features": false,
|
||||
"version>=": "1.7.0-beta.1"
|
||||
"version>=": "1.7.0"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
||||
@ -214,6 +214,10 @@ if(BUILD_TESTING)
|
||||
add_subdirectory(test/nlohmann-json-test)
|
||||
endif()
|
||||
add_subdirectory(test/fault-injector)
|
||||
|
||||
if(BUILD_TRANSPORT_CURL)
|
||||
add_subdirectory(test/libcurl-stress-test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_PERFORMANCE_TESTS)
|
||||
|
||||
19
sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt
Normal file
19
sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(azure-core-libcurl-stress-test LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
add_executable(
|
||||
azure-core-libcurl-stress-test
|
||||
libcurl_stress_test.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(azure-core-libcurl-stress-test PRIVATE azure-core)
|
||||
|
||||
create_map_file(azure-core-libcurl-stress-test azure-core-libcurl-stress-test.map)
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Dockerfile
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
||||
16
sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml
Normal file
16
sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
apiVersion: v2
|
||||
name: libcurl-stress-test
|
||||
description: An example of c++ stress test
|
||||
version: 0.0.1
|
||||
appVersion: v0.1
|
||||
annotations:
|
||||
stressTest: 'true' # enable auto-discovery of this test via `find-all-stress-packages.ps1`
|
||||
namespace: 'azuresdkforcpp'
|
||||
|
||||
dependencies:
|
||||
- name: stress-test-addons
|
||||
version: 0.1.19
|
||||
repository: https://stresstestcharts.blob.core.windows.net/helm/
|
||||
16
sdk/core/azure-core/test/libcurl-stress-test/Dockerfile
Normal file
16
sdk/core/azure-core/test/libcurl-stress-test/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04
|
||||
|
||||
ARG targetTest
|
||||
ARG build
|
||||
|
||||
# copy the tagrget binary
|
||||
ADD $targetTest ./$targetTest
|
||||
RUN chmod +x ./$targetTest
|
||||
|
||||
# install the mem check tool
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install valgrind -y
|
||||
|
||||
29
sdk/core/azure-core/test/libcurl-stress-test/README.md
Normal file
29
sdk/core/azure-core/test/libcurl-stress-test/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Stress test prototype
|
||||
This is work in progress. It's a prototype of how a stress test would look. This PR is to park the work in progress while being dealing with higher priority issues.
|
||||
## Components
|
||||
### Code (https://en.wikipedia.org/wiki/C%2B%2B)
|
||||
The cpp file represents the code for the test, it will generate a number of invalid URLs and then issue CURL send commands. The requests are expected to fail. The point was that it exposes memory leaks in handling the error cases, which we fixed since.
|
||||
|
||||
### Dockerfile (https://www.docker.com/)
|
||||
Represents the build file for the container in which the test runs, it is based on ubuntu 22.04 , from mcr.
|
||||
The main change from default ubuntu is making sure we have the valgrind tool installed. Valgrind is a heap monitoring tool that helps identify potential stack traces that might leak memory. While not 100% effective is is great at reducing the surface are for investigations.
|
||||
|
||||
### Helm chart (https://helm.sh/)
|
||||
Chart.yaml together with the bicep file(https://docs.microsoft.com/azure/azure-resource-manager/bicep/overview?tabs=bicep) and the deploy job file , represent the helm chart needed to deploy to the docker image built from the dockerfile to the stress cluster and execute the stress test.
|
||||
|
||||
The helm chart creates a pod with a container based on the docker image, and executes the test under valgrind.
|
||||
|
||||
To deploy the chart you will need to run "azure-sdk-for-cpp\eng\common\scripts\stress-testing> .\deploy-stress-tests.ps1 -Namespace azuresdkforcpp -SearchDirectory E:\src\azure-sdk-for-cpp\sdk\core\azure-core\test -PushImage"
|
||||
|
||||
Where namaspace will be created if missing , search directory can be any folder where it will search for charts in it and all it's sub dirs, push image will call it to build the docker image.
|
||||
|
||||
ATM the docker image is build by hand and harcoded in the chart to simplify matters.
|
||||
|
||||
To build the image run "docker build -t stresstesttbiruti6oi24k.acr.io/azuresdkforcpp/curlstress:v8 --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on ."
|
||||
|
||||
To push to mcr : "docker push stresstesttbiruti6oi24k.acr.io/azuresdkforcpp/curlstress:v8"
|
||||
Obviously after logging in to the acr "az acr login -n stresspgs7b6dif73rup6.azurecr.io"
|
||||
|
||||
To use another image you will need to go to line 12 in deploy job and update with your new file.
|
||||
|
||||
Once the deploy succeeds run " kubectl logs -n azuresdkforcpp -f libcurl-stress-test" to grab the logs in real time .
|
||||
@ -0,0 +1,83 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/**
|
||||
* @brief Validates the Azure Core transport adapters with fault responses from server.
|
||||
*
|
||||
* @note This test requires the Http-fault-injector
|
||||
* (https://github.com/Azure/azure-sdk-tools/tree/main/tools/http-fault-injector) running. Follow
|
||||
* the instructions to install and run the server before running this test.
|
||||
*
|
||||
*/
|
||||
|
||||
#define REQUESTS 100
|
||||
#define WARMUP 100
|
||||
#define ROUNDS 100
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/core/http/curl_transport.hpp>
|
||||
#include <iostream>
|
||||
|
||||
void SendRequest(std::string target)
|
||||
{
|
||||
std::cout << target << std::endl;
|
||||
// The transport adapter must allow insecure SSL certs.
|
||||
Azure::Core::Http::CurlTransportOptions curlOptions;
|
||||
curlOptions.SslVerifyPeer = false;
|
||||
auto implementationClient = std::make_shared<Azure::Core::Http::CurlTransport>(curlOptions);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Azure::Core::Context context;
|
||||
auto request
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, Azure::Core::Url(target));
|
||||
auto response = implementationClient->Send(request, context);
|
||||
// Make sure to pull all bytes from network.
|
||||
auto body = response->ExtractBodyStream()->ReadToEnd();
|
||||
}
|
||||
catch (std::exception const&)
|
||||
{
|
||||
// don't print exceptions, they are happening at each request, this is the point of the test
|
||||
}
|
||||
}
|
||||
|
||||
void Operation(int repetitions)
|
||||
{
|
||||
std::string base = "https://xyz.";
|
||||
for (int i = 0; i < repetitions; i++)
|
||||
{
|
||||
std::cout << i << std::endl;
|
||||
SendRequest(base + std::to_string(i) + ".abc");
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char**)
|
||||
{
|
||||
// some param was passed to the program, doesn't matter what it is,
|
||||
// it is meant for the moment to just run a quick iteration to check for sanity of the test.
|
||||
// since prototype TODO: pass in warmup/rounds/requests as params.
|
||||
if (argc != 1)
|
||||
{
|
||||
std::cout << "--------------\tBUILD TEST\t--------------" << std::endl;
|
||||
Operation(5);
|
||||
std::cout << "--------------\tEND BUILD TEST\t--------------" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::cout << "--------------\tSTARTING TEST\t--------------" << std::endl;
|
||||
std::cout << "--------------\tPRE WARMUP\t--------------" << std::endl;
|
||||
Operation(WARMUP);
|
||||
|
||||
std::cout << "--------------\tPOST WARMUP\t--------------" << std::endl;
|
||||
|
||||
for (int i = 0; i < ROUNDS; i++)
|
||||
{
|
||||
std::cout << "--------------\tTEST ITERATION:" << i << "\t--------------" << std::endl;
|
||||
Operation(REQUESTS);
|
||||
|
||||
std::cout << "--------------\tDONE ITERATION:" << i << "\t--------------" << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// Dummy parameter to handle defaults the script passes in
|
||||
param testApplicationOid string = ''
|
||||
|
||||
resource config 'Microsoft.AppConfiguration/configurationStores@2020-07-01-preview' = {
|
||||
name: 'config-${resourceGroup().name}'
|
||||
location: resourceGroup().location
|
||||
sku: {
|
||||
name: 'Standard'
|
||||
}
|
||||
}
|
||||
|
||||
output RESOURCE_GROUP string = resourceGroup().name
|
||||
output AZURE_CLIENT_OID string = testApplicationOid
|
||||
@ -0,0 +1,22 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: MIT
|
||||
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.deploy-example") -}}
|
||||
{{- define "stress.deploy-example" -}}
|
||||
metadata:
|
||||
labels:
|
||||
testName: "libcurl-stress-test"
|
||||
name: "libcurl-stress-test"
|
||||
spec:
|
||||
containers:
|
||||
- name: libcurl-stress-test
|
||||
image: stresspgs7b6dif73rup6.azurecr.io/azuresdkforcpp/curlstress:latest
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
[
|
||||
"valgrind",
|
||||
"--tool=memcheck",
|
||||
"-s",
|
||||
"./azure-core-libcurl-stress-test",
|
||||
]
|
||||
{{- include "stress-test-addons.container-env" . | nindent 6 }}
|
||||
{{- end -}}
|
||||
@ -1,5 +1,15 @@
|
||||
# Release History
|
||||
|
||||
## 4.1.0-beta.2 (Unreleased)
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.1.0-beta.1 (2022-07-07)
|
||||
|
||||
### Features Added
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_MAJOR 4
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_MINOR 1
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_PATCH 0
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_PRERELEASE "beta.1"
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_PRERELEASE "beta.2"
|
||||
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_ITOA_HELPER(i) #i
|
||||
#define AZURE_SECURITY_KEYVAULT_CERTIFICATES_VERSION_ITOA(i) \
|
||||
|
||||
@ -1,5 +1,15 @@
|
||||
# Release History
|
||||
|
||||
## 4.3.0-beta.2 (Unreleased)
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.3.0-beta.1 (2022-07-07)
|
||||
|
||||
### Features Added
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_MAJOR 4
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_MINOR 3
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_PATCH 0
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_PRERELEASE "beta.1"
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_PRERELEASE "beta.2"
|
||||
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_ITOA_HELPER(i) #i
|
||||
#define AZURE_SECURITY_KEYVAULT_KEYS_VERSION_ITOA(i) \
|
||||
|
||||
@ -1,5 +1,15 @@
|
||||
# Release History
|
||||
|
||||
## 4.1.0-beta.2 (Unreleased)
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 4.1.0-beta.1 (2022-07-07)
|
||||
|
||||
### Features Added
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_MAJOR 4
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_MINOR 1
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_PATCH 0
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_PRERELEASE "beta.1"
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_PRERELEASE "beta.2"
|
||||
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_ITOA_HELPER(i) #i
|
||||
#define AZURE_SECURITY_KEYVAULT_SECRETS_VERSION_ITOA(i) \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user