From e0706ba1fba166fbd85de980ded84648a468e338 Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:11:50 -0700 Subject: [PATCH 01/37] Stress test (#3820) * mem leak fix * PR comments fix * PR comments * seems to work? * clang * curl again * add first stress test * also update gitignore * missing line * only linux * clang typo format * typo 2 * PR comments * cspell * remove terminator --- .gitignore | 2 +- sdk/core/azure-core/CMakeLists.txt | 1 + .../test/libcurl-stress-test/CMakeLists.txt | 26 +++++ .../test/libcurl-stress-test/Dockerfile | 15 +++ .../libcurl_stress_test.cpp | 95 +++++++++++++++++++ 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/Dockerfile create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp diff --git a/.gitignore b/.gitignore index 2b3a003e55..f426b11b3d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ [Rr]eleases/ x64/ x86/ -bld/ +bld*/ [Bb]in/ [Oo]bj/ [Ll]og/ diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index 978a59def3..b2ead6cd0e 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -204,6 +204,7 @@ if(BUILD_TESTING) add_subdirectory(test/nlohmann-json-test) endif() add_subdirectory(test/fault-injector) + add_subdirectory(test/libcurl-stress-test) endif() if (BUILD_PERFORMANCE_TESTS) diff --git a/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt b/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt new file mode 100644 index 0000000000..1ef828894e --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt @@ -0,0 +1,26 @@ +# 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}/) + +find_program(DOCKER_EXECUTABLE docker) +#if docker is found try to build the docker image in the defined docker_build stage which should be run after build +if(DOCKER_EXECUTABLE) + add_custom_target(docker_build + COMMAND ${DOCKER_EXECUTABLE} build --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on --tag=azuresdkforcpp/curlstress -f Dockerfile .) +endif() diff --git a/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile b/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile new file mode 100644 index 0000000000..1373c598f4 --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile @@ -0,0 +1,15 @@ +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 + +# execute under memcheck tool +RUN valgrind --tool=memcheck -s ./$targetTest $build diff --git a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp new file mode 100644 index 0000000000..d3d429b68d --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp @@ -0,0 +1,95 @@ +// 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 +#include +#include +#include +#include +#include +#include +#include +#include + +void SendRequest(std::string target) +{ + std::cout << target << std::endl; + /* The transport adapter must allow insecure SSL certs. + If both curl and winHttp are available, curl is preferred for this test.for*/ +#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER) + Azure::Core::Http::CurlTransportOptions curlOptions; + curlOptions.SslVerifyPeer = false; + auto implementationClient = std::make_shared(curlOptions); + +#elif (BUILD_TRANSPORT_WINHTTP_ADAPTER) + Azure::Core::Http::WinHttpTransportOptions winHttpOptions; + auto implementationClient = std::make_shared(winHttpOptions); +#endif + try + { + + Azure::Core::Context context; + // auto duration = std::chrono::milliseconds(1000); + // auto deadline = std::chrono::system_clock::now() + duration; + auto request + = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, Azure::Core::Url(target)); + auto response = implementationClient->Send(request, context); //.WithDeadline(deadline)); + // Make sure to pull all bytes from network. + auto body = response->ExtractBodyStream()->ReadToEnd(); + } + catch (std::exception const&) + { + } +} + +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** argv) // i can have either 0 or 2 params here +{ + (void)argv; // to get rid of the unused warning + // some param was passed to the program , which happens only in build mode, not run of the docker + // file. thus we will run a quick test to make sure the executable runs. + 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; +} From a3926d6437b84772eb55bd466763fd2fd420a714 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 13 Jul 2022 15:00:25 -0700 Subject: [PATCH 02/37] Fixed the metadata for better handling (#3824) Co-authored-by: sima-zhu --- eng/common/scripts/Helpers/Metadata-Helpers.ps1 | 3 +-- .../scripts/Service-Level-Readme-Automation.ps1 | 16 ++++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/eng/common/scripts/Helpers/Metadata-Helpers.ps1 b/eng/common/scripts/Helpers/Metadata-Helpers.ps1 index d5cd1af642..ba6f32b7d7 100644 --- a/eng/common/scripts/Helpers/Metadata-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Metadata-Helpers.ps1 @@ -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) { diff --git a/eng/common/scripts/Service-Level-Readme-Automation.ps1 b/eng/common/scripts/Service-Level-Readme-Automation.ps1 index 0fc334dd6b..1bef012293 100644 --- a/eng/common/scripts/Service-Level-Readme-Automation.ps1 +++ b/eng/common/scripts/Service-Level-Readme-Automation.ps1 @@ -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*(?(.*\n?)*?)---\n*(?(.*\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 } From 593437b8f2d17f0a5caf1cd87a127b57cc148ff5 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Fri, 15 Jul 2022 10:06:16 -0700 Subject: [PATCH 03/37] Update attestation core vcpkg dependency to latest GA version that is required. (#3830) * Update attestation core vcpkg dependency to latest GA version that is required. * Update vcpkg config.cmake to match the dependency version needed. --- .../azure-security-attestation/vcpkg/Config.cmake.in | 2 +- sdk/attestation/azure-security-attestation/vcpkg/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/attestation/azure-security-attestation/vcpkg/Config.cmake.in b/sdk/attestation/azure-security-attestation/vcpkg/Config.cmake.in index a5e4700f81..1872375c39 100644 --- a/sdk/attestation/azure-security-attestation/vcpkg/Config.cmake.in +++ b/sdk/attestation/azure-security-attestation/vcpkg/Config.cmake.in @@ -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") diff --git a/sdk/attestation/azure-security-attestation/vcpkg/vcpkg.json b/sdk/attestation/azure-security-attestation/vcpkg/vcpkg.json index bf420be4ac..a92569c2d8 100644 --- a/sdk/attestation/azure-security-attestation/vcpkg/vcpkg.json +++ b/sdk/attestation/azure-security-attestation/vcpkg/vcpkg.json @@ -14,7 +14,7 @@ { "name": "azure-core-cpp", "default-features": false, - "version>=": "1.7.0-beta.1" + "version>=": "1.7.0" }, { "name": "vcpkg-cmake", From 7bf67350a28c7959c0a5924608a0cf64d6eb6ad9 Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Fri, 15 Jul 2022 13:47:01 -0700 Subject: [PATCH 04/37] Remove winhttp (#3832) * remove refs to winhttp * this tsst only curl --- sdk/core/azure-core/CMakeLists.txt | 5 ++++- .../test/libcurl-stress-test/libcurl_stress_test.cpp | 8 ++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index b2ead6cd0e..c53694845d 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -204,7 +204,10 @@ if(BUILD_TESTING) add_subdirectory(test/nlohmann-json-test) endif() add_subdirectory(test/fault-injector) - add_subdirectory(test/libcurl-stress-test) + + if(BUILD_TRANSPORT_CURL) + add_subdirectory(test/libcurl-stress-test) + endif() endif() if (BUILD_PERFORMANCE_TESTS) diff --git a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp index d3d429b68d..c47b9d736d 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp +++ b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp @@ -27,16 +27,12 @@ void SendRequest(std::string target) { std::cout << target << std::endl; /* The transport adapter must allow insecure SSL certs. - If both curl and winHttp are available, curl is preferred for this test.for*/ -#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER) + If both curl and winHttp are available, curl is preferred for this test*/ + Azure::Core::Http::CurlTransportOptions curlOptions; curlOptions.SslVerifyPeer = false; auto implementationClient = std::make_shared(curlOptions); -#elif (BUILD_TRANSPORT_WINHTTP_ADAPTER) - Azure::Core::Http::WinHttpTransportOptions winHttpOptions; - auto implementationClient = std::make_shared(winHttpOptions); -#endif try { From 73bb61d64ba0cfafb2b624c1d677a67e97b18978 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 15 Jul 2022 14:22:26 -0700 Subject: [PATCH 05/37] Move perf.yml to eng/common (#3833) Co-authored-by: Mike Harder --- eng/common/pipelines/templates/jobs/perf.yml | 130 +++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 eng/common/pipelines/templates/jobs/perf.yml diff --git a/eng/common/pipelines/templates/jobs/perf.yml b/eng/common/pipelines/templates/jobs/perf.yml new file mode 100644 index 0000000000..17a5cb8315 --- /dev/null +++ b/eng/common/pipelines/templates/jobs/perf.yml @@ -0,0 +1,130 @@ +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.csv + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + displayName: Print results.csv + 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 From cff96f8598d318bbdae8df103e078502d9ad15c2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 15 Jul 2022 15:54:57 -0700 Subject: [PATCH 06/37] Sync eng/common directory with azure-sdk-tools for PR 3656 (#3834) * someone wants to reference the test-proxy startup scripts externally. to make this easy on them we're parameterizing the root of the eng/common for easy use in that scenario * two leading $ signs on the definition of the certificate path was causing some issues! Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- eng/common/testproxy/test-proxy-docker.yml | 5 +++-- eng/common/testproxy/test-proxy-tool.yml | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eng/common/testproxy/test-proxy-docker.yml b/eng/common/testproxy/test-proxy-docker.yml index df2548ab77..52a7c807a3 100644 --- a/eng/common/testproxy/test-proxy-docker.yml +++ b/eng/common/testproxy/test-proxy-docker.yml @@ -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: | diff --git a/eng/common/testproxy/test-proxy-tool.yml b/eng/common/testproxy/test-proxy-tool.yml index 7b5fedaaeb..679ad2108d 100644 --- a/eng/common/testproxy/test-proxy-tool.yml +++ b/eng/common/testproxy/test-proxy-tool.yml @@ -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 }}" From c3ecbcddad43367f00ba61f168bc548e4bed31b5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 19 Jul 2022 13:34:32 -0700 Subject: [PATCH 07/37] Update casing for 'verison' (#3821) Co-authored-by: Daniel Jurek --- eng/common/scripts/Update-DocsMsMetadata.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Update-DocsMsMetadata.ps1 b/eng/common/scripts/Update-DocsMsMetadata.ps1 index c0b7d55563..b6b696758a 100644 --- a/eng/common/scripts/Update-DocsMsMetadata.ps1 +++ b/eng/common/scripts/Update-DocsMsMetadata.ps1 @@ -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"] } From b95cdcf709ad6ea1061d61c3d177c13b347b8150 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 19 Jul 2022 16:39:20 -0700 Subject: [PATCH 08/37] Print additional result summary formats to pipelines UI (#3842) Co-authored-by: Mike Harder --- eng/common/pipelines/templates/jobs/perf.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eng/common/pipelines/templates/jobs/perf.yml b/eng/common/pipelines/templates/jobs/perf.yml index 17a5cb8315..3d3a3f6e31 100644 --- a/eng/common/pipelines/templates/jobs/perf.yml +++ b/eng/common/pipelines/templates/jobs/perf.yml @@ -106,12 +106,24 @@ jobs: ${{ 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 From 584f83c7bd0399a5c473508c459d3e11fcf2c764 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 19 Jul 2022 17:21:08 -0700 Subject: [PATCH 09/37] Sync eng/common directory with azure-sdk-tools for PR 3702 (#3843) * Add language-service to list of valid sample slugs * Update link to taxonomies Co-authored-by: Heath Stewart --- eng/common/scripts/Test-SampleMetadata.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/common/scripts/Test-SampleMetadata.ps1 b/eng/common/scripts/Test-SampleMetadata.ps1 index d5681e85d3..6ce31c2095 100644 --- a/eng/common/scripts/Test-SampleMetadata.ps1 +++ b/eng/common/scripts/Test-SampleMetadata.ps1 @@ -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. From 6c74e576f212f8e7c249200f827712be01558310 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 21 Jul 2022 12:02:53 -0700 Subject: [PATCH 10/37] Fix incorrect failure notification in vcpkg publishing (#3838) * Set up for testing of template pipeline * Override branches, set up for template GA release * More TODOs to prevent merging an unintended change * More removal of TestPipeline * Increment template version number * Use script to set package version * Check out the correct branch * branch parameter in the command * Use $(PublishToVcpkg) to determine if we should check for changes * dictionary syntax * Set GA package version to validate GA publish scenario * Update changelog * create-pull-request.yml optionally pushes changes * Output GH PR URI * Macro syntax with a variable set earlier * Move up to 1.2.0-beta.2 * beta.1 * Revert changelog * Revert testing-related changes * Revert vcpkg-clone.yml * Revert eng/common changes, ensure global $(HasChanges) is set properly * Changes to enable testing * 1.1.0-beta.1 * vcpkg clone should clone at configured branch * Clone "main" branch of vcpkg betas * Undo test-specific changes * More PR cleanup * PR cleanup --- .../templates/stages/archetype-cpp-release.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 21f35c8ad6..e4070400a6 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -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: From 992a3a94092b91109ebba86937307f2c87274bbd Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Mon, 25 Jul 2022 11:25:05 -0700 Subject: [PATCH 11/37] Helm charts (#3841) * helm chart * first pipe setup * poi * magiks * ewewe * stress * cleanup * pr * QFE and readme * clang * stupid clang , waste of time * ewqwewewrqrewewrqewrqwrqr * stupid clang * cspell * PR * try try again * clang again --- .vscode/cspell.json | 2 ++ .../test/libcurl-stress-test/CMakeLists.txt | 7 ----- .../test/libcurl-stress-test/Chart.yaml | 16 ++++++++++ .../test/libcurl-stress-test/Dockerfile | 5 ++-- .../test/libcurl-stress-test/README.md | 29 +++++++++++++++++++ .../libcurl_stress_test.cpp | 24 +++++---------- .../stress-test-resources.bicep | 16 ++++++++++ .../templates/deploy-job.yaml | 22 ++++++++++++++ 8 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/README.md create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/stress-test-resources.bicep create mode 100644 sdk/core/azure-core/test/libcurl-stress-test/templates/deploy-job.yaml diff --git a/.vscode/cspell.json b/.vscode/cspell.json index cd1346732a..77305e988d 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -11,6 +11,8 @@ "*.exe", "*.a", "*.lib", + "*.yaml", + "**/libcurl-stress-test/README.md", ".github/CODEOWNERS", ".gitignore", ".vscode/cspell.json", diff --git a/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt b/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt index 1ef828894e..e802aaa385 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt +++ b/sdk/core/azure-core/test/libcurl-stress-test/CMakeLists.txt @@ -17,10 +17,3 @@ 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}/) - -find_program(DOCKER_EXECUTABLE docker) -#if docker is found try to build the docker image in the defined docker_build stage which should be run after build -if(DOCKER_EXECUTABLE) - add_custom_target(docker_build - COMMAND ${DOCKER_EXECUTABLE} build --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on --tag=azuresdkforcpp/curlstress -f Dockerfile .) -endif() diff --git a/sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml b/sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml new file mode 100644 index 0000000000..8b3a5f87bf --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/Chart.yaml @@ -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/ diff --git a/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile b/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile index 1373c598f4..1cdc7c7f49 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile +++ b/sdk/core/azure-core/test/libcurl-stress-test/Dockerfile @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# SPDX-License-Identifier: MIT + FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04 ARG targetTest @@ -11,5 +14,3 @@ RUN chmod +x ./$targetTest RUN apt-get update -y RUN apt-get install valgrind -y -# execute under memcheck tool -RUN valgrind --tool=memcheck -s ./$targetTest $build diff --git a/sdk/core/azure-core/test/libcurl-stress-test/README.md b/sdk/core/azure-core/test/libcurl-stress-test/README.md new file mode 100644 index 0000000000..300534d165 --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/README.md @@ -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 . \ No newline at end of file diff --git a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp index c47b9d736d..698fc6fd8f 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp +++ b/sdk/core/azure-core/test/libcurl-stress-test/libcurl_stress_test.cpp @@ -9,26 +9,19 @@ * the instructions to install and run the server before running this test. * */ + #define REQUESTS 100 #define WARMUP 100 #define ROUNDS 100 #include #include -#include -#include #include -#include -#include -#include -#include void SendRequest(std::string target) { std::cout << target << std::endl; - /* The transport adapter must allow insecure SSL certs. - If both curl and winHttp are available, curl is preferred for this test*/ - + // The transport adapter must allow insecure SSL certs. Azure::Core::Http::CurlTransportOptions curlOptions; curlOptions.SslVerifyPeer = false; auto implementationClient = std::make_shared(curlOptions); @@ -37,16 +30,15 @@ void SendRequest(std::string target) { Azure::Core::Context context; - // auto duration = std::chrono::milliseconds(1000); - // auto deadline = std::chrono::system_clock::now() + duration; auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, Azure::Core::Url(target)); - auto response = implementationClient->Send(request, context); //.WithDeadline(deadline)); + 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 } } @@ -60,11 +52,11 @@ void Operation(int repetitions) } } -int main(int argc, char** argv) // i can have either 0 or 2 params here +int main(int argc, char**) { - (void)argv; // to get rid of the unused warning - // some param was passed to the program , which happens only in build mode, not run of the docker - // file. thus we will run a quick test to make sure the executable runs. + // 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; diff --git a/sdk/core/azure-core/test/libcurl-stress-test/stress-test-resources.bicep b/sdk/core/azure-core/test/libcurl-stress-test/stress-test-resources.bicep new file mode 100644 index 0000000000..d008b28bfd --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/stress-test-resources.bicep @@ -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 diff --git a/sdk/core/azure-core/test/libcurl-stress-test/templates/deploy-job.yaml b/sdk/core/azure-core/test/libcurl-stress-test/templates/deploy-job.yaml new file mode 100644 index 0000000000..17c13ebee5 --- /dev/null +++ b/sdk/core/azure-core/test/libcurl-stress-test/templates/deploy-job.yaml @@ -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 -}} From 8cb8a43b6c865960e02a0f06c248cc6d32557253 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:30:18 -0700 Subject: [PATCH 12/37] Sync eng/common directory with azure-sdk-tools for PR 3661 (#3846) * Add full clone fallback to sparse checkout * Improve clone handling and overrides for sparse checkout * Use SkipSparseCheckout variable name Co-authored-by: Ben Broderick Phillips --- .../templates/steps/sparse-checkout.yml | 124 ++++++++++++------ 1 file changed, 87 insertions(+), 37 deletions(-) diff --git a/eng/common/pipelines/templates/steps/sparse-checkout.yml b/eng/common/pipelines/templates/steps/sparse-checkout.yml index a3b553b3a7..efc8c6ed92 100644 --- a/eng/common/pipelines/templates/steps/sparse-checkout.yml +++ b/eng/common/pipelines/templates/steps/sparse-checkout.yml @@ -23,52 +23,79 @@ steps: # Define this inline, because of the chicken/egg problem with loading a script when nothing # has been checked out yet. script: | - function SparseCheckout([Array]$paths, [Hashtable]$repository) + function Clone([Hashtable]$repository) { - $dir = $repository.WorkingDirectory - if (!$dir) { - $dir = "./$($repository.Name)" - } - New-Item $dir -ItemType Directory -Force - Push-Location $dir + if (Test-Path .git) { + Write-Warning "Deleting existing git repository" + Write-Host "Remove-Item -Force -Recurse ./*" + Remove-Item -Force -Recurse ./* + } - if (Test-Path .git/info/sparse-checkout) { - $hasInitialized = $true - Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step." - } else { - Write-Host "Repository $($repository.Name) is being initialized." + Write-Host "git clone https://github.com/$($repository.Name) ." + git clone https://github.com/$($repository.Name) . + if ($LASTEXITCODE) { + exit $LASTEXITCODE + } + Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" + # This will use the default branch if repo.Commitish is empty + git -c advice.detachedHead=false checkout $($repository.Commitish) + if ($LASTEXITCODE) { + exit $LASTEXITCODE + } + } - Write-Host "git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) ." - git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) . + function SparseCheckout([Array]$paths, [Hashtable]$repository) + { + if (Test-Path .git/info/sparse-checkout) { + $hasInitialized = $true + Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step." + } else { + Write-Host "Repository $($repository.Name) is being initialized." + + Write-Host "git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) ." + git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) . + if ($LASTEXITCODE) { + throw + } - Write-Host "git sparse-checkout init" - git sparse-checkout init + Write-Host "git sparse-checkout init" + git sparse-checkout init + if ($LASTEXITCODE) { + throw + } - # 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 - Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'" - git sparse-checkout set --no-cone '/*' '!/*/' '/eng' + # 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 + Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'" + git sparse-checkout set --no-cone '/*' '!/*/' '/eng' + if ($LASTEXITCODE) { + throw } + } - # Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*') - $quotedPaths = $paths | ForEach-Object { "'$_'" } - $gitsparsecmd = "git sparse-checkout add $quotedPaths" - Write-Host $gitsparsecmd - Invoke-Expression -Command $gitsparsecmd + # Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*') + $quotedPaths = $paths | ForEach-Object { "'$_'" } + $gitsparsecmd = "git sparse-checkout add $quotedPaths" + Write-Host $gitsparsecmd + Invoke-Expression -Command $gitsparsecmd + if ($LASTEXITCODE) { + throw + } - Write-Host "Set sparse checkout paths to:" - Get-Content .git/info/sparse-checkout + Write-Host "Set sparse checkout paths to:" + Get-Content .git/info/sparse-checkout - # sparse-checkout commands after initial checkout will auto-checkout again - if (!$hasInitialized) { - Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" - # This will use the default branch if repo.Commitish is empty - git -c advice.detachedHead=false checkout $($repository.Commitish) - } else { - Write-Host "Skipping checkout as repo has already been initialized" + # sparse-checkout commands after initial checkout will auto-checkout again + if (!$hasInitialized) { + Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" + # This will use the default branch if repo.Commitish is empty + git -c advice.detachedHead=false checkout $($repository.Commitish) + if ($LASTEXITCODE) { + throw } - - Pop-Location + } else { + Write-Host "Skipping checkout as repo has already been initialized" + } } # Paths may be sourced as a yaml object literal OR a dynamically generated variable json string. @@ -77,7 +104,30 @@ steps: # Replace windows backslash paths, as Azure Pipelines default directories are sometimes formatted like 'D:\a\1\s' $repositories = '${{ convertToJson(parameters.Repositories) }}' -replace '\\', '/' | ConvertFrom-Json -AsHashtable foreach ($repo in $Repositories) { - SparseCheckout $paths $repo + $dir = $repo.WorkingDirectory + if (!$dir) { + $dir = "./$($repo.Name)" + } + New-Item $dir -ItemType Directory -Force + Push-Location $dir + + try { + # Enable global override if there are sparse checkout issues + if ('$(SkipSparseCheckout)' -ne 'true') { + try { + SparseCheckout $paths $repo + } catch { + # Fallback to full clone if sparse checkout is not working properly + Write-Warning "Sparse checkout failed, falling back to full clone" + Clone $repo + } + } else { + Write-Warning "Sparse checkout disabled, performing full clone" + Clone $repo + } + } finally { + Pop-Location + } } pwsh: true workingDirectory: $(System.DefaultWorkingDirectory) From ea2d3adb91ef3d8de3613ecd8fde961f074d1f88 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 25 Jul 2022 14:50:31 -0700 Subject: [PATCH 13/37] Sync eng/common directory with azure-sdk-tools for PR 3735 (#3845) * Detect API changes using new snadboxinx approach * Added strictmode * Remove unset variable * Changes as per strict mode 3 * Rervert strict mode to allow language level fixes to merge first Co-authored-by: praveenkuttappan --- eng/common/scripts/Detect-Api-Changes.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 1c9cdf696b..572ef43e1c 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -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 From a75c95b4f7a9b9135074ec2eae34171928e3cd3b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 25 Jul 2022 16:45:01 -0700 Subject: [PATCH 14/37] Increment version for keyvault releases (#3809) * Increment package version after release of azure-security-keyvault-keys * Increment package version after release of azure-security-keyvault-secrets * Increment package version after release of azure-security-keyvault-certificates --- .../azure-security-keyvault-certificates/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- .../azure-security-keyvault-secrets/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md index a3ad0491f7..63171c8ca4 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/CHANGELOG.md @@ -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 diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/private/package_version.hpp b/sdk/keyvault/azure-security-keyvault-certificates/src/private/package_version.hpp index ee2c3e9f99..55e836f964 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/private/package_version.hpp +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/private/package_version.hpp @@ -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) \ diff --git a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md index 0bf3216cbe..5bc04107a4 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-keys/CHANGELOG.md @@ -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 diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp b/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp index 53d984b152..a79e5bbb04 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp +++ b/sdk/keyvault/azure-security-keyvault-keys/src/private/package_version.hpp @@ -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) \ diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md index e848b7c34a..a8d5bab494 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-secrets/CHANGELOG.md @@ -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 diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/private/package_version.hpp b/sdk/keyvault/azure-security-keyvault-secrets/src/private/package_version.hpp index 7b5d417fbd..23e0cc9253 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/private/package_version.hpp +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/private/package_version.hpp @@ -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) \ From c437f5a8b8d23b5dc4e16427fb1d54f8e0b2559d Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Mon, 25 Jul 2022 17:29:09 -0700 Subject: [PATCH 15/37] Removed hard dependency on opentelemetry version (#3844) --- sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt index bf3077e676..6d0dc15151 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +++ b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt @@ -36,7 +36,7 @@ if (BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) find_package(azure-core-cpp REQUIRED) endif() endif() - find_package(opentelemetry-cpp "1.3.0" CONFIG REQUIRED) + find_package(opentelemetry-cpp CONFIG REQUIRED) set( AZURE_CORE_OPENTELEMETRY_HEADER From 209dcaea4e61ab6cbdaf73c370e44c888608e640 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 26 Jul 2022 10:51:59 -0700 Subject: [PATCH 16/37] Revert "Add full clone fallback to sparse checkout (#3661)" (#3851) This reverts commit 7605ead00308dd20f20f2afe5acc4ec9900a2c47. Co-authored-by: Ben Broderick Phillips --- .../templates/steps/sparse-checkout.yml | 124 ++++++------------ 1 file changed, 37 insertions(+), 87 deletions(-) diff --git a/eng/common/pipelines/templates/steps/sparse-checkout.yml b/eng/common/pipelines/templates/steps/sparse-checkout.yml index efc8c6ed92..a3b553b3a7 100644 --- a/eng/common/pipelines/templates/steps/sparse-checkout.yml +++ b/eng/common/pipelines/templates/steps/sparse-checkout.yml @@ -23,79 +23,52 @@ steps: # Define this inline, because of the chicken/egg problem with loading a script when nothing # has been checked out yet. script: | - function Clone([Hashtable]$repository) - { - if (Test-Path .git) { - Write-Warning "Deleting existing git repository" - Write-Host "Remove-Item -Force -Recurse ./*" - Remove-Item -Force -Recurse ./* - } - - Write-Host "git clone https://github.com/$($repository.Name) ." - git clone https://github.com/$($repository.Name) . - if ($LASTEXITCODE) { - exit $LASTEXITCODE - } - Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" - # This will use the default branch if repo.Commitish is empty - git -c advice.detachedHead=false checkout $($repository.Commitish) - if ($LASTEXITCODE) { - exit $LASTEXITCODE - } - } - function SparseCheckout([Array]$paths, [Hashtable]$repository) { - if (Test-Path .git/info/sparse-checkout) { - $hasInitialized = $true - Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step." - } else { - Write-Host "Repository $($repository.Name) is being initialized." - - Write-Host "git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) ." - git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) . - if ($LASTEXITCODE) { - throw + $dir = $repository.WorkingDirectory + if (!$dir) { + $dir = "./$($repository.Name)" } + New-Item $dir -ItemType Directory -Force + Push-Location $dir - Write-Host "git sparse-checkout init" - git sparse-checkout init - if ($LASTEXITCODE) { - throw - } + if (Test-Path .git/info/sparse-checkout) { + $hasInitialized = $true + Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step." + } else { + Write-Host "Repository $($repository.Name) is being initialized." + + Write-Host "git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) ." + git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) . - # 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 - Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'" - git sparse-checkout set --no-cone '/*' '!/*/' '/eng' - if ($LASTEXITCODE) { - throw + Write-Host "git sparse-checkout init" + git sparse-checkout init + + # 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 + Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'" + git sparse-checkout set --no-cone '/*' '!/*/' '/eng' } - } - # Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*') - $quotedPaths = $paths | ForEach-Object { "'$_'" } - $gitsparsecmd = "git sparse-checkout add $quotedPaths" - Write-Host $gitsparsecmd - Invoke-Expression -Command $gitsparsecmd - if ($LASTEXITCODE) { - throw - } + # Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*') + $quotedPaths = $paths | ForEach-Object { "'$_'" } + $gitsparsecmd = "git sparse-checkout add $quotedPaths" + Write-Host $gitsparsecmd + Invoke-Expression -Command $gitsparsecmd - Write-Host "Set sparse checkout paths to:" - Get-Content .git/info/sparse-checkout + Write-Host "Set sparse checkout paths to:" + Get-Content .git/info/sparse-checkout - # sparse-checkout commands after initial checkout will auto-checkout again - if (!$hasInitialized) { - Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" - # This will use the default branch if repo.Commitish is empty - git -c advice.detachedHead=false checkout $($repository.Commitish) - if ($LASTEXITCODE) { - throw + # sparse-checkout commands after initial checkout will auto-checkout again + if (!$hasInitialized) { + Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)" + # This will use the default branch if repo.Commitish is empty + git -c advice.detachedHead=false checkout $($repository.Commitish) + } else { + Write-Host "Skipping checkout as repo has already been initialized" } - } else { - Write-Host "Skipping checkout as repo has already been initialized" - } + + Pop-Location } # Paths may be sourced as a yaml object literal OR a dynamically generated variable json string. @@ -104,30 +77,7 @@ steps: # Replace windows backslash paths, as Azure Pipelines default directories are sometimes formatted like 'D:\a\1\s' $repositories = '${{ convertToJson(parameters.Repositories) }}' -replace '\\', '/' | ConvertFrom-Json -AsHashtable foreach ($repo in $Repositories) { - $dir = $repo.WorkingDirectory - if (!$dir) { - $dir = "./$($repo.Name)" - } - New-Item $dir -ItemType Directory -Force - Push-Location $dir - - try { - # Enable global override if there are sparse checkout issues - if ('$(SkipSparseCheckout)' -ne 'true') { - try { - SparseCheckout $paths $repo - } catch { - # Fallback to full clone if sparse checkout is not working properly - Write-Warning "Sparse checkout failed, falling back to full clone" - Clone $repo - } - } else { - Write-Warning "Sparse checkout disabled, performing full clone" - Clone $repo - } - } finally { - Pop-Location - } + SparseCheckout $paths $repo } pwsh: true workingDirectory: $(System.DefaultWorkingDirectory) From f2efcedd1dcdf1afcc1e047719db38c24242def9 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:52:01 -0700 Subject: [PATCH 17/37] Sync eng/common directory with azure-sdk-tools for PR 3753 (#3857) * Bump MacOs version to macos-11 * Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 Co-authored-by: Wes Haggard * Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 Co-authored-by: Wes Haggard Co-authored-by: sima-zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Wes Haggard --- eng/common/scripts/job-matrix/README.md | 6 +++--- .../scripts/job-matrix/samples/matrix.json | 2 +- .../tests/job-matrix-functions.filter.tests.ps1 | 2 +- .../tests/job-matrix-functions.tests.ps1 | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eng/common/scripts/job-matrix/README.md b/eng/common/scripts/job-matrix/README.md index b9f540e42e..51c57506f9 100644 --- a/eng/common/scripts/job-matrix/README.md +++ b/eng/common/scripts/job-matrix/README.md @@ -102,7 +102,7 @@ Example: "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -380,7 +380,7 @@ In the matrix job output that azure pipelines consumes, the format is a dictiona { "net461_macOS1015": { "framework": "net461", - "operatingSystem": "macOS-10.15" + "operatingSystem": "macos-11" }, "net50_ubuntu1804": { "framework": "net50", @@ -512,7 +512,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete "Agent": { "windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" }, "ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" }, - "macOS-10.15": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" } + "macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, "JavaTestVersion": [ "1.8", "1.11" ], "AZURE_TEST_HTTP_CLIENTS": "netty", diff --git a/eng/common/scripts/job-matrix/samples/matrix.json b/eng/common/scripts/job-matrix/samples/matrix.json index a9e291604d..98e1dd757f 100644 --- a/eng/common/scripts/job-matrix/samples/matrix.json +++ b/eng/common/scripts/job-matrix/samples/matrix.json @@ -6,7 +6,7 @@ "Agent": { "ubuntu": { "OSVmImage": "ubuntu-18.04", "Pool": "Azure Pipelines" }, "windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" }, - "macOS": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" } + "macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, "TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ] }, diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 index a25367bebf..7c327eb27d 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { $matrixConfig = @" { "matrix": { - "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macOS-10.15" ], + "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macos-11" ], "framework": [ "net461", "netcoreapp2.1" ], "additionalArguments": [ "", "mode=test" ] } diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 index 38b7e44429..689ed91083 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 @@ -12,7 +12,7 @@ BeforeAll { "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -36,11 +36,11 @@ BeforeAll { "framework": "net461" }, { - "operatingSystem": "macOS-10.15", + "operatingSystem": "macos-11", "framework": "netcoreapp2.1" }, { - "operatingSystem": ["macOS-10.15", "ubuntu-18.04"], + "operatingSystem": ["macos-11", "ubuntu-18.04"], "additionalArguments": "--enableFoo" } ] @@ -275,7 +275,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -340,7 +340,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { $element.parameters.additionalArguments | Should -Be "--enableFoo" $element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions - $element.parameters.operatingSystem | Should -Be "macOS-10.15" + $element.parameters.operatingSystem | Should -Be "macos-11" $element.parameters.framework | Should -Be "netcoreapp2.1" $element.parameters.additionalArguments | Should -Be "--enableFoo" } @@ -348,7 +348,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { It "Should initialize a sparse matrix from an N-dimensional matrix" -TestCases @( @{ i = 0; name = "windows2019_net461"; operatingSystem = "windows-2019"; framework = "net461"; additionalArguments = ""; } @{ i = 1; name = "ubuntu1804_netcoreapp21_withfoo"; operatingSystem = "ubuntu-18.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; } - @{ i = 2; name = "macOS1015_net461"; operatingSystem = "macOS-10.15"; framework = "net461"; additionalArguments = ""; } + @{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; } ) { $sparseMatrix = GenerateSparseMatrix $generateConfig.matrixParameters $generateConfig.displayNamesLookup $dimensions = GetMatrixDimensions $generateConfig.matrixParameters @@ -440,9 +440,9 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { $matrix[2].parameters.operatingSystem | Should -Be "ubuntu-18.04" $matrix[2].parameters.additionalArguments | Should -Be "" - $matrix[4].name | Should -Be "macOS1015_net461" + $matrix[4].name | Should -Be "macOS11_net461" $matrix[4].parameters.framework | Should -Be "net461" - $matrix[4].parameters.operatingSystem | Should -Be "macOS-10.15" + $matrix[4].parameters.operatingSystem | Should -Be "macos-11" $matrix[4].parameters.additionalArguments | Should -Be "" $matrix[7].name | Should -Be "windows2019_net50_enableWindowsFoo" From 9843c71d774b41fd2f8acb8e9f8edce162aa60af Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Wed, 27 Jul 2022 21:57:20 -0700 Subject: [PATCH 18/37] Bump macOs version to macos-11 (#3853) --- .../templates/stages/platform-matrix-cmakegenerate.json | 2 +- .../stages/platform-matrix-cmakesourcegenerate.json | 2 +- eng/pipelines/templates/stages/platform-matrix-live.json | 2 +- eng/pipelines/templates/stages/platform-matrix.json | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json b/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json index 1bab65ae73..a0ac2ef0c0 100644 --- a/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json +++ b/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json @@ -15,7 +15,7 @@ }, "Mac": { "Pool": "Azure Pipelines", - "OSVmImage": "macOS-10.15", + "OSVmImage": "macos-11", "VCPKG_DEFAULT_TRIPLET": "x64-osx" } } diff --git a/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json b/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json index 701d9d055f..49ac2e648a 100644 --- a/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json +++ b/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json @@ -14,7 +14,7 @@ }, "Mac": { "Pool": "Azure Pipelines", - "OSVmImage": "macOS-10.15", + "OSVmImage": "macos-11", "CmakeEnvArg": "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include ", "BrewDependencies": "openssl" } diff --git a/eng/pipelines/templates/stages/platform-matrix-live.json b/eng/pipelines/templates/stages/platform-matrix-live.json index b843833c84..7e9f018107 100644 --- a/eng/pipelines/templates/stages/platform-matrix-live.json +++ b/eng/pipelines/templates/stages/platform-matrix-live.json @@ -7,7 +7,7 @@ "StaticConfigs": { "MacOS_x64_with_unit_test": { "Pool": "Azure Pipelines", - "OSVmImage": "macOS-10.15", + "OSVmImage": "macos-11", "VCPKG_DEFAULT_TRIPLET": "x64-osx", "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON", "AZURE_CORE_ENABLE_JSON_TESTS": 1, diff --git a/eng/pipelines/templates/stages/platform-matrix.json b/eng/pipelines/templates/stages/platform-matrix.json index 15571ad469..889b8392c3 100644 --- a/eng/pipelines/templates/stages/platform-matrix.json +++ b/eng/pipelines/templates/stages/platform-matrix.json @@ -5,11 +5,8 @@ "include": [ { "OSConfiguration": { - "macOS-10.15": { - "OSVmImage": "macOS-10.15" - }, "macOS-11": { - "OSVmImage": "macOS-11", + "OSVmImage": "macos-11", "XCODE_VERSION": "12.5.1" } }, From 1dab2c16de185bcaf957f2b1929a105548fc5644 Mon Sep 17 00:00:00 2001 From: Rick Winter Date: Thu, 28 Jul 2022 12:10:23 -0700 Subject: [PATCH 19/37] Update CHANGELOG.md --- sdk/core/azure-core/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index c5f96f2554..cc253905c9 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- [[#3794]](https://github.com/Azure/azure-sdk-for-cpp/issues/3794) Fix memory leak in `CurlTransport`. + ### Other Changes ## 1.7.0 (2022-06-30) From 9eae0dff88df72b19f6853709a30b3126e4464d0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:30:41 -0700 Subject: [PATCH 20/37] Fix misleading step name in az module install (#3859) Co-authored-by: Ben Broderick Phillips --- eng/common/TestResources/setup-environments.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/TestResources/setup-environments.yml b/eng/common/TestResources/setup-environments.yml index ef400bcb1d..a829b8dadf 100644 --- a/eng/common/TestResources/setup-environments.yml +++ b/eng/common/TestResources/setup-environments.yml @@ -21,7 +21,7 @@ steps: condition: contains(variables['OSVmImage'], 'mac') - task: Powershell@2 - displayName: Register Dogfood environment + displayName: Setup Az Modules and Dogfood Environment inputs: targetType: inline pwsh: true From 86b3305b0992aa338229fc75485c3e620bc08849 Mon Sep 17 00:00:00 2001 From: John Heffner Date: Mon, 1 Aug 2022 12:11:43 -0400 Subject: [PATCH 21/37] Retry poll calls on EINTR (#3858) When signals are delievered to the process, calls here to poll may be interrupted and return with a spurious failure. The call instead should be restarted. --- sdk/core/azure-core/src/http/curl/curl.cpp | 51 ++++++++++++++-------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/sdk/core/azure-core/src/http/curl/curl.cpp b/sdk/core/azure-core/src/http/curl/curl.cpp index 6c5123907b..661ff211d2 100644 --- a/sdk/core/azure-core/src/http/curl/curl.cpp +++ b/sdk/core/azure-core/src/http/curl/curl.cpp @@ -1,12 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // SPDX-License-Identifier: MIT +#include "azure/core/platform.hpp" + +#if defined(AZ_PLATFORM_WINDOWS) +#if !defined(WIN32_LEAN_AND_MEAN) +#define WIN32_LEAN_AND_MEAN +#endif +#if !defined(NOMINMAX) +#define NOMINMAX +#endif +#endif + #include "azure/core/http/curl_transport.hpp" #include "azure/core/http/http.hpp" #include "azure/core/http/policies/policy.hpp" #include "azure/core/http/transport.hpp" #include "azure/core/internal/diagnostics/log.hpp" -#include "azure/core/platform.hpp" // Private include #include "curl_connection_pool_private.hpp" @@ -17,16 +27,11 @@ #include // for poll() #include // for socket shutdown #elif defined(AZ_PLATFORM_WINDOWS) -#if !defined(WIN32_LEAN_AND_MEAN) -#define WIN32_LEAN_AND_MEAN -#endif -#if !defined(NOMINMAX) -#define NOMINMAX -#endif #include // for WSAPoll(); #endif #include +#include #include #include @@ -94,25 +99,35 @@ int pollSocketUntilEventOrTimeout( // we use 1 as arg. // Cancelation is possible by calling poll() with small time intervals instead of using the - // requested timeout. Default interval for calling poll() is 1 sec whenever arg timeout is - // greater than 1 sec. Otherwise the interval is set to timeout - long interval = 1000; // 1 second - if (timeout < interval) - { - interval = timeout; - } + // requested timeout. The polling interval is 1 second. + static constexpr std::chrono::milliseconds pollInterval(1000); // 1 second int result = 0; - for (long counter = 0; counter < timeout && result == 0; counter = counter + interval) + auto now = std::chrono::steady_clock::now(); + auto deadline = now + std::chrono::milliseconds(timeout); + while (now < deadline) { // check cancelation context.ThrowIfCancelled(); + int pollTimeoutMs = static_cast( + std::min( + pollInterval, std::chrono::duration_cast(deadline - now)) + .count()); #if defined(AZ_PLATFORM_POSIX) - result = poll(&poller, 1, interval); + result = poll(&poller, 1, pollTimeoutMs); + if (result < 0 && EINTR == errno) + { + continue; + } #elif defined(AZ_PLATFORM_WINDOWS) - result = WSAPoll(&poller, 1, interval); + result = WSAPoll(&poller, 1, pollTimeoutMs); #endif + if (result != 0) + { + return result; + } + now = std::chrono::steady_clock::now(); } - // result can be either 0 (timeout) or > 1 (socket ready) + // result can be 0 (timeout), > 0 (socket ready), or < 0 (error) return result; } From 9a0463849afc8ee75bbfc9b87779e0aa5d594f9e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:01:54 -0700 Subject: [PATCH 22/37] Fix bad path to sample matrix json (#3860) Co-authored-by: Ben Broderick Phillips --- eng/common/scripts/job-matrix/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/job-matrix/README.md b/eng/common/scripts/job-matrix/README.md index 51c57506f9..d112c53574 100644 --- a/eng/common/scripts/job-matrix/README.md +++ b/eng/common/scripts/job-matrix/README.md @@ -39,13 +39,13 @@ jobs: parameters: MatrixConfigs: - Name: base_product_matrix - Path: eng/scripts/job-matrix/samples/matrix.json + Path: eng/common/scripts/job-matrix/samples/matrix.json Selection: all NonSparseParameters: - framework GenerateVMJobs: true - Name: sparse_product_matrix - Path: eng/scripts/job-matrix/samples/matrix.json + Path: eng/common/scripts/job-matrix/samples/matrix.json Selection: sparse GenerateVMJobs: true JobTemplatePath: /eng/common/scripts/job-matrix/samples/matrix-job-sample.yml From e8906ca3b484a8f5421f37baebd40b02b7ed3e17 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Aug 2022 15:42:00 -0700 Subject: [PATCH 23/37] Sync eng/common directory with azure-sdk-tools for PR 3826 (#3863) * Add link checking for stress CI * Remove region segment from stress testing links Co-authored-by: Ben Broderick Phillips --- eng/common/pipelines/templates/steps/verify-links.yml | 2 +- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index 12e14d3991..8a84f8d0ec 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -28,4 +28,4 @@ steps: -branchReplacementName ${{ parameters.BranchReplacementName }} -devOpsLogging: $true -checkLinkGuidance: ${{ parameters.CheckLinkGuidance }} - -inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt" \ No newline at end of file + -inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt" diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index 97c4d925fe..9369dcc6ba 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -253,7 +253,7 @@ function CheckDependencies() }, @{ Command = "az"; - Help = "Azure CLI must be installed: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli"; + Help = "Azure CLI must be installed: https://docs.microsoft.com/cli/azure/install-azure-cli"; } ) From 755d717df7d88b9b314d29c64d57d4bafa6e8782 Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Thu, 4 Aug 2022 11:00:06 -0700 Subject: [PATCH 24/37] Core August releases (#3862) * Core August releases * cspell Co-authored-by: Anton Kolesnyk --- .vscode/cspell.json | 2 ++ .../azure-core-tracing-opentelemetry/CHANGELOG.md | 10 +++------- sdk/core/azure-core/CHANGELOG.md | 13 +++++++------ sdk/core/azure-core/src/private/package_version.hpp | 6 +++--- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 77305e988d..cc369ee81c 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -192,6 +192,8 @@ "davidchisnall", "Gabor", "Gyimesi", + "Heffner", + "johnwheffner", "Joubert", "juchem", "lordgamez", diff --git a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md index 86367b48ee..4e5d91913c 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md +++ b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md @@ -1,15 +1,11 @@ # Release History -## 1.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed +## 1.0.0-beta.3 (2022-08-04) ### Other Changes +- Removed hard dependency on `opentelemetry-cpp` package version. + ## 1.0.0-beta.2 (2022-06-30) ### Breaking Changes diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index cc253905c9..6943fb3a43 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,16 +1,17 @@ # Release History -## 1.8.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.7.1 (2022-08-04) ### Bugs Fixed - [[#3794]](https://github.com/Azure/azure-sdk-for-cpp/issues/3794) Fix memory leak in `CurlTransport`. +- [[#3692]](https://github.com/Azure/azure-sdk-for-cpp/issues/3692) Interrupted poll calls cause spurious HTTP request failures. (A community contribution, courtesy of _[johnwheffner](https://github.com/johnwheffner)_) -### Other Changes +### Acknowledgments + +Thank you to our developer community members who helped to make Azure Core better with their contributions to this release: + +- John Heffner _([GitHub](https://github.com/johnwheffner))_ ## 1.7.0 (2022-06-30) diff --git a/sdk/core/azure-core/src/private/package_version.hpp b/sdk/core/azure-core/src/private/package_version.hpp index 5c06d2895c..ccdaf968ce 100644 --- a/sdk/core/azure-core/src/private/package_version.hpp +++ b/sdk/core/azure-core/src/private/package_version.hpp @@ -11,9 +11,9 @@ #include #define AZURE_CORE_VERSION_MAJOR 1 -#define AZURE_CORE_VERSION_MINOR 8 -#define AZURE_CORE_VERSION_PATCH 0 -#define AZURE_CORE_VERSION_PRERELEASE "beta.1" +#define AZURE_CORE_VERSION_MINOR 7 +#define AZURE_CORE_VERSION_PATCH 1 +#define AZURE_CORE_VERSION_PRERELEASE "" #define AZURE_CORE_VERSION_ITOA_HELPER(i) #i #define AZURE_CORE_VERSION_ITOA(i) AZURE_CORE_VERSION_ITOA_HELPER(i) From 5a8d62358aec9a613d9199e050868ce8655c7e61 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Aug 2022 12:23:08 -0700 Subject: [PATCH 25/37] Increment version for core releases (#3865) * Increment package version after release of azure-core * Increment package version after release of azure-core-tracing-opentelemetry --- sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- sdk/core/azure-core/CHANGELOG.md | 10 ++++++++++ sdk/core/azure-core/src/private/package_version.hpp | 6 +++--- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md index 4e5d91913c..abb1f76468 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md +++ b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.3 (2022-08-04) ### Other Changes diff --git a/sdk/core/azure-core-tracing-opentelemetry/src/private/package_version.hpp b/sdk/core/azure-core-tracing-opentelemetry/src/private/package_version.hpp index dae62804f5..fb747ab534 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/src/private/package_version.hpp +++ b/sdk/core/azure-core-tracing-opentelemetry/src/private/package_version.hpp @@ -13,7 +13,7 @@ #define AZURE_CORE_OPENTELEMETRY_VERSION_MAJOR 1 #define AZURE_CORE_OPENTELEMETRY_VERSION_MINOR 0 #define AZURE_CORE_OPENTELEMETRY_VERSION_PATCH 0 -#define AZURE_CORE_OPENTELEMETRY_VERSION_PRERELEASE "beta.3" +#define AZURE_CORE_OPENTELEMETRY_VERSION_PRERELEASE "beta.4" #define AZURE_CORE_OPENTELEMETRY_VERSION_ITOA_HELPER(i) #i #define AZURE_CORE_OPENTELEMETRY_VERSION_ITOA(i) AZURE_CORE_OPENTELEMETRY_VERSION_ITOA_HELPER(i) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 6943fb3a43..96f04c8223 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.8.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.7.1 (2022-08-04) ### Bugs Fixed diff --git a/sdk/core/azure-core/src/private/package_version.hpp b/sdk/core/azure-core/src/private/package_version.hpp index ccdaf968ce..5c06d2895c 100644 --- a/sdk/core/azure-core/src/private/package_version.hpp +++ b/sdk/core/azure-core/src/private/package_version.hpp @@ -11,9 +11,9 @@ #include #define AZURE_CORE_VERSION_MAJOR 1 -#define AZURE_CORE_VERSION_MINOR 7 -#define AZURE_CORE_VERSION_PATCH 1 -#define AZURE_CORE_VERSION_PRERELEASE "" +#define AZURE_CORE_VERSION_MINOR 8 +#define AZURE_CORE_VERSION_PATCH 0 +#define AZURE_CORE_VERSION_PRERELEASE "beta.1" #define AZURE_CORE_VERSION_ITOA_HELPER(i) #i #define AZURE_CORE_VERSION_ITOA(i) AZURE_CORE_VERSION_ITOA_HELPER(i) From 54111348d1914bbedcbc0140976d8d516c0ac52a Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Fri, 5 Aug 2022 09:43:47 +0800 Subject: [PATCH 26/37] Storage Aug GA release (#3864) --- sdk/storage/azure-storage-blobs/CHANGELOG.md | 8 ++------ .../azure-storage-blobs/src/private/package_version.hpp | 2 +- sdk/storage/azure-storage-blobs/vcpkg.json | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index ecaf1a8736..5cf3c6699d 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 12.5.0-beta.3 (Unreleased) +## 12.5.0 (2022-08-08) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Features in `12.5.0.beta1` and `12.5.0.beta2` are now generally available. ## 12.5.0-beta.2 (2022-07-07) diff --git a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp index 7b4f6ff65e..8b751729f4 100644 --- a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp +++ b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp @@ -11,7 +11,7 @@ #define AZURE_STORAGE_BLOBS_VERSION_MAJOR 12 #define AZURE_STORAGE_BLOBS_VERSION_MINOR 5 #define AZURE_STORAGE_BLOBS_VERSION_PATCH 0 -#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "beta.3" +#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "" #define AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) #i #define AZURE_STORAGE_BLOBS_VERSION_ITOA(i) AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) diff --git a/sdk/storage/azure-storage-blobs/vcpkg.json b/sdk/storage/azure-storage-blobs/vcpkg.json index fa4846e6ee..f253d39633 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg.json +++ b/sdk/storage/azure-storage-blobs/vcpkg.json @@ -1,6 +1,6 @@ { "name": "azure-storage-blobs-cpp", - "version-semver": "12.5.0-beta.1", + "version-semver": "12.5.0", "description": [ "Microsoft Azure Storage Blobs SDK for C++", "This library provides Azure Storage Blobs SDK." From bf658629421282681af037a94abdbf5d4a3a9522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 4 Aug 2022 22:45:26 -0700 Subject: [PATCH 27/37] CG only runs on internal (#3866) * Condition added and indentation changes --- .../templates/jobs/archetype-sdk-client.yml | 19 ++++++++++--------- eng/pipelines/templates/jobs/ci.tests.yml | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 14883215a9..eac4f65709 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -262,13 +262,14 @@ jobs: - template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml - - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 - displayName: 'Generate BOM' - condition: succeededOrFailed() - inputs: - BuildDropPath: $(Build.SourcesDirectory)/build + - ${{if eq(variables['System.TeamProject'], 'internal') }}: + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generate BOM' + condition: succeededOrFailed() + inputs: + BuildDropPath: $(Build.SourcesDirectory)/build - - template: /eng/common/pipelines/templates/steps/publish-artifact.yml - parameters: - ArtifactPath: '$(Build.SourcesDirectory)/build/_manifest' - ArtifactName: 'release_artifact_manifest' + - template: /eng/common/pipelines/templates/steps/publish-artifact.yml + parameters: + ArtifactPath: '$(Build.SourcesDirectory)/build/_manifest' + ArtifactName: 'release_artifact_manifest' diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index 9f27a6f855..6d9def8f4f 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -260,13 +260,14 @@ jobs: displayName: Set bom file artifact name condition: succeededOrFailed() - - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 - displayName: 'Generate BOM' - condition: succeededOrFailed() - inputs: - BuildDropPath: $(Build.ArtifactStagingDirectory) + - ${{if eq(variables['System.TeamProject'], 'internal') }}: + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generate BOM' + condition: succeededOrFailed() + inputs: + BuildDropPath: $(Build.ArtifactStagingDirectory) - - template: /eng/common/pipelines/templates/steps/publish-artifact.yml - parameters: - ArtifactPath: '$(Build.ArtifactStagingDirectory)/_manifest' - ArtifactName: 'bom_manifest_$(BomArtifactName)' \ No newline at end of file + - template: /eng/common/pipelines/templates/steps/publish-artifact.yml + parameters: + ArtifactPath: '$(Build.ArtifactStagingDirectory)/_manifest' + ArtifactName: 'bom_manifest_$(BomArtifactName)' From 93991ab122a5d8ec757445476ac01916b0d1ca6f Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Thu, 4 Aug 2022 22:54:50 -0700 Subject: [PATCH 28/37] STG 79 80 81 Features (#3850) --- sdk/storage/azure-storage-blobs/CHANGELOG.md | 15 + .../storage/blobs/blob_container_client.hpp | 18 + .../inc/azure/storage/blobs/blob_options.hpp | 12 + .../azure/storage/blobs/blob_responses.hpp | 45 ++ .../azure/storage/blobs/blob_sas_builder.hpp | 15 + .../inc/azure/storage/blobs/rest_client.hpp | 165 +++-- .../azure-storage-blobs/src/blob_client.cpp | 2 + .../src/blob_container_client.cpp | 230 ++++--- .../src/blob_responses.cpp | 12 +- .../src/blob_sas_builder.cpp | 26 +- .../src/block_blob_client.cpp | 1 + .../azure-storage-blobs/src/rest_client.cpp | 614 ++++++++++++++---- .../azure-storage-blobs/swagger/README.md | 62 +- .../test/ut/blob_container_client_test.cpp | 124 +++- .../test/ut/blob_sas_test.cpp | 30 + .../test/ut/block_blob_client_test.cpp | 59 ++ ...obContainerClientTest.EncryptionScope.json | 438 +++++++++++++ ...obContainerClientTest.SpecialBlobName.json | 332 ++++++---- .../BlobContainerClientTest.Tags.json | 456 ++++++++++--- .../BlobServiceClientTest.SetProperties.json | 60 +- ...obClientTest.CopyWithTagsMetadataTier.json | 314 +++++---- ...ntTest.SyncCopyFromUriEncryptionScope.json | 270 ++++++++ .../BlockBlobClientTest.UploadFromUri.json | 201 ++++-- sdk/storage/azure-storage-common/CHANGELOG.md | 3 + .../storage/common/account_sas_builder.hpp | 10 + .../src/account_sas_builder.cpp | 14 +- sdk/storage/test-resources-post.ps1 | 7 + 27 files changed, 2733 insertions(+), 802 deletions(-) create mode 100644 sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.EncryptionScope.json create mode 100644 sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.SyncCopyFromUriEncryptionScope.json diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index 5cf3c6699d..7683eb758b 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 12.6.0-beta1 (Unreleased) + +### Features Added + +- Bumped up API version to `2021-04-10`. +- Added support for encryption scope SAS (`ses` query parameter in SAS token). +- Added encryption scope support for `BlobClient::CopyFromUri()`. +- Added support for filtering blobs on container level. +- Added support for tags copy mode (replace or copy from source) when copying blobs from URL. +- Added support for permanent delete permission in SAS. + +### Bugs Fixed + +- Fixed listing blobs failure when blob name contains invalid characters in xml. + ## 12.5.0 (2022-08-08) ### Features Added diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp index e25d3c8235..74a4de2dc5 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp @@ -285,6 +285,24 @@ namespace Azure { namespace Storage { namespace Blobs { const UploadBlockBlobOptions& options = UploadBlockBlobOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; + /** + * @brief The Filter Blobs operation enables callers to list blobs in a container whose + * tags match a given search expression. + * + * @param tagFilterSqlExpression The where parameter enables the caller to query blobs + * whose tags match a given expression. The given expression must evaluate to true for a blob to + * be returned in the results. The [OData - ABNF] filter syntax rule defines the formal grammar + * for the value of the where query parameter, however, only a subset of the OData filter syntax + * is supported in the Blob service. + * @param options Optional parameters to execute this function. + * @param context Context for cancelling long running operations. + * @return A FindBlobsByTagsPagedResponse describing the blobs. + */ + FindBlobsByTagsPagedResponse FindBlobsByTags( + const std::string& tagFilterSqlExpression, + const FindBlobsByTagsOptions& options = FindBlobsByTagsOptions(), + const Azure::Core::Context& context = Azure::Core::Context()) const; + /** * @brief Creates a new batch object to collect subrequests that can be submitted together via * SubmitBatch. diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp index 912cee90ec..9235eeeb35 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp @@ -574,6 +574,12 @@ namespace Azure { namespace Storage { namespace Blobs { * Indicates whether the destination blob has a legal hold. */ Azure::Nullable HasLegalHold; + + /** + * Indicates the tags on the destination blob should be copied from source or replaced by Tags + * in this option. Default is to replace. + */ + Models::BlobCopySourceTagsMode CopySourceTagsMode; }; /** @@ -932,6 +938,12 @@ namespace Azure { namespace Storage { namespace Blobs { * If the two hashes do not match, the operation will fail. */ Azure::Nullable TransactionalContentHash; + + /** + * Indicates the tags on the destination blob should be copied from source or replaced by Tags + * in this option. Default is to replace. + */ + Models::BlobCopySourceTagsMode CopySourceTagsMode; }; /** diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp index 573265ca44..b0bf4fdd64 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_responses.hpp @@ -163,6 +163,49 @@ namespace Azure { namespace Storage { std::string LeaseId; }; + /** + * @brief An Azure Storage blob. + */ + struct BlobItem final + { + /** + * Blob name. + */ + std::string Name; + /** + * Indicates whether this blob was deleted. + */ + bool IsDeleted = bool(); + /** + * A string value that uniquely identifies a blob snapshot. + */ + std::string Snapshot; + /** + * A string value that uniquely identifies a blob version. + */ + Nullable VersionId; + /** + * Indicates if this is the current version of the blob. + */ + Nullable IsCurrentVersion; + /** + * Properties of a blob. + */ + BlobItemDetails Details; + /** + * Indicates that this root blob has been deleted, but it has versions that are active. + */ + Nullable HasVersionsOnly; + /** + * Size in bytes. + */ + int64_t BlobSize = int64_t(); + /** + * Type of the blob. + */ + Models::BlobType BlobType; + }; + /** * @brief Response type for #Azure::Storage::Blobs::BlobBatchClient::SubmitBatch. */ @@ -267,10 +310,12 @@ namespace Azure { namespace Storage { void OnNextPage(const Azure::Core::Context& context); std::shared_ptr m_blobServiceClient; + std::shared_ptr m_blobContainerClient; FindBlobsByTagsOptions m_operationOptions; std::string m_tagFilterSqlExpression; friend class BlobServiceClient; + friend class BlobContainerClient; friend class Azure::Core::PagedResponse; }; diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp index b988b4ba21..16c27507a3 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp @@ -90,6 +90,11 @@ namespace Azure { namespace Storage { namespace Sas { */ SetImmutabilityPolicy = 256, + /** + * @brief Indicates that permanent delete is permitted. + */ + PermanentDelete = 512, + /** * @brief Indicates that all permissions are set. */ @@ -160,6 +165,11 @@ namespace Azure { namespace Storage { namespace Sas { */ SetImmutabilityPolicy = 128, + /** + * @brief Indicates that permanent delete is permitted. + */ + PermanentDelete = 256, + /** * @brief Indicates that all permissions are set. */ @@ -269,6 +279,11 @@ namespace Azure { namespace Storage { namespace Sas { */ std::string ContentType; + /** + * @brief Optional encryption scope to use when sending requests authorized with this SAS url. + */ + std::string EncryptionScope; + /** * @brief Sets the permissions for the blob container SAS. * diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp index 316f370646..2cb58be985 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp @@ -31,7 +31,7 @@ namespace Azure { namespace Storage { namespace Blobs { /** * The version used for the operations to Azure storage services. */ - constexpr static const char* ApiVersion = "2020-10-02"; + constexpr static const char* ApiVersion = "2021-04-10"; } // namespace _detail namespace Models { /** @@ -619,20 +619,6 @@ namespace Azure { namespace Storage { namespace Blobs { */ std::map Tags; }; - namespace _detail { - /** - * @brief The result of a Filter Blobs API call. - */ - struct FindBlobsByTagsResult final - { - std::string ServiceEndpoint; - /** - * Array of TaggedBlobItem. - */ - std::vector Items; - Nullable ContinuationToken; - }; - } // namespace _detail /** * @brief Response type for #Azure::Storage::Blobs::BlobContainerClient::Create. */ @@ -820,6 +806,18 @@ namespace Azure { namespace Storage { namespace Blobs { */ std::string ContentType; }; + /** + * @brief The result of a Filter Blobs API call. + */ + struct FindBlobsByTagsResult final + { + std::string ServiceEndpoint; + /** + * Array of TaggedBlobItem. + */ + std::vector Items; + Nullable ContinuationToken; + }; /** * @brief Response type for #Azure::Storage::Blobs::BlobContainerClient::AcquireLease. */ @@ -921,6 +919,17 @@ namespace Azure { namespace Storage { namespace Blobs { */ std::string LeaseId; }; + struct BlobName final + { + /** + * Indicates if the blob name is encoded. + */ + bool Encoded = bool(); + /** + * The name of the blob. + */ + std::string Content; + }; } // namespace _detail /** * @brief Status of the copy operation. @@ -1314,48 +1323,50 @@ namespace Azure { namespace Storage { namespace Blobs { private: std::string m_value; }; - /** - * @brief An Azure Storage blob. - */ - struct BlobItem final - { - /** - * Blob name. - */ - std::string Name; - /** - * Indicates whether this blob was deleted. - */ - bool IsDeleted = bool(); - /** - * A string value that uniquely identifies a blob snapshot. - */ - std::string Snapshot; - /** - * A string value that uniquely identifies a blob version. - */ - Nullable VersionId; - /** - * Indicates if this is the current version of the blob. - */ - Nullable IsCurrentVersion; - /** - * Properties of a blob. - */ - BlobItemDetails Details; - /** - * Indicates that this root blob has been deleted, but it has versions that are active. - */ - Nullable HasVersionsOnly; - /** - * Size in bytes. - */ - int64_t BlobSize = int64_t(); + namespace _detail { /** - * Type of the blob. + * @brief An Azure Storage blob. */ - Models::BlobType BlobType; - }; + struct BlobItem final + { + /** + * Blob name. + */ + BlobName Name; + /** + * Indicates whether this blob was deleted. + */ + bool IsDeleted = bool(); + /** + * A string value that uniquely identifies a blob snapshot. + */ + std::string Snapshot; + /** + * A string value that uniquely identifies a blob version. + */ + Nullable VersionId; + /** + * Indicates if this is the current version of the blob. + */ + Nullable IsCurrentVersion; + /** + * Properties of a blob. + */ + BlobItemDetails Details; + /** + * Indicates that this root blob has been deleted, but it has versions that are active. + */ + Nullable HasVersionsOnly; + /** + * Size in bytes. + */ + int64_t BlobSize = int64_t(); + /** + * Type of the blob. + */ + Models::BlobType BlobType; + }; + } // namespace _detail /** * @brief Include this parameter to specify one or more datasets to include in the response. */ @@ -1423,9 +1434,9 @@ namespace Azure { namespace Storage { namespace Blobs { */ std::vector Items; /** - * Array of ListBlobsHierarchySegmentResponseBlobPrefixesItem. + * Array of BlobName. */ - std::vector BlobPrefixes; + std::vector BlobPrefixes; }; } // namespace _detail /** @@ -2159,6 +2170,26 @@ namespace Azure { namespace Storage { namespace Blobs { Models::CopyStatus CopyStatus; }; } // namespace _detail + /** + * @brief Optional, default 'replace'. Indicates if source tags should be copied or replaced + * with the tags specified by x-ms-tags. + */ + class BlobCopySourceTagsMode final { + public: + BlobCopySourceTagsMode() = default; + explicit BlobCopySourceTagsMode(std::string value) : m_value(std::move(value)) {} + bool operator==(const BlobCopySourceTagsMode& other) const + { + return m_value == other.m_value; + } + bool operator!=(const BlobCopySourceTagsMode& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static BlobCopySourceTagsMode Replace; + AZ_STORAGE_BLOBS_DLLEXPORT const static BlobCopySourceTagsMode Copy; + + private: + std::string m_value; + }; /** * @brief Response type for #Azure::Storage::Blobs::BlobClient::CopyFromUri. */ @@ -2194,6 +2225,12 @@ namespace Azure { namespace Storage { namespace Blobs { * copied content. This header is only returned if the source content MD5 was specified. */ Nullable TransactionalContentHash; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account + * encryption scope. + */ + Nullable EncryptionScope; }; /** * @brief Response type for #Azure::Storage::Blobs::BlobClient::AbortCopyFromUri. @@ -3323,6 +3360,17 @@ namespace Azure { namespace Storage { namespace Blobs { Core::IO::BodyStream& requestBody, const SubmitBlobContainerBatchOptions& options, const Core::Context& context); + struct FindBlobContainerBlobsByTagsOptions final + { + Nullable Where; + Nullable Marker; + Nullable MaxResults; + }; + static Response FindBlobsByTags( + Core::Http::_internal::HttpPipeline& pipeline, + const Core::Url& url, + const FindBlobContainerBlobsByTagsOptions& options, + const Core::Context& context); struct AcquireBlobContainerLeaseOptions final { Nullable Duration; @@ -3692,6 +3740,8 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable ImmutabilityPolicyMode; Nullable LegalHold; Nullable CopySourceAuthorization; + Nullable EncryptionScope; + Nullable CopySourceTags; Nullable> SourceContentcrc64; }; static Response CopyFromUri( @@ -4134,6 +4184,7 @@ namespace Azure { namespace Storage { namespace Blobs { std::string CopySource; Nullable CopySourceBlobProperties; Nullable CopySourceAuthorization; + Nullable CopySourceTags; Nullable> SourceContentcrc64; }; static Response UploadFromUri( diff --git a/sdk/storage/azure-storage-blobs/src/blob_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_client.cpp index f82598396e..e391f3e376 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_client.cpp @@ -677,6 +677,8 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.ImmutabilityPolicyMode = options.ImmutabilityPolicy.Value().PolicyMode; } protocolLayerOptions.LegalHold = options.HasLegalHold; + protocolLayerOptions.EncryptionScope = m_encryptionScope; + protocolLayerOptions.CopySourceTags = options.CopySourceTagsMode; return _detail::BlobClient::CopyFromUri(*m_pipeline, m_blobUrl, protocolLayerOptions, context); } diff --git a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp index b79eab00a4..806a753aaf 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_container_client.cpp @@ -22,6 +22,87 @@ namespace Azure { namespace Storage { namespace Blobs { + namespace { + Models::BlobItem BlobItemConversion(Models::_detail::BlobItem& item) + { + Models::BlobItem blobItem; + if (item.Name.Encoded) + { + blobItem.Name = Core::Url::Decode(item.Name.Content); + } + else + { + blobItem.Name = std::move(item.Name.Content); + } + blobItem.IsDeleted = item.IsDeleted; + blobItem.Snapshot = std::move(item.Snapshot); + blobItem.VersionId = std::move(item.VersionId); + blobItem.IsCurrentVersion = item.IsCurrentVersion; + blobItem.Details = std::move(item.Details); + blobItem.HasVersionsOnly = item.HasVersionsOnly; + blobItem.BlobSize = item.BlobSize; + blobItem.BlobType = std::move(item.BlobType); + if (blobItem.Details.AccessTier.HasValue() + && !blobItem.Details.IsAccessTierInferred.HasValue()) + { + blobItem.Details.IsAccessTierInferred = false; + } + if (blobItem.VersionId.HasValue()) + { + if (!blobItem.HasVersionsOnly.HasValue()) + { + blobItem.HasVersionsOnly = false; + } + if (!blobItem.IsCurrentVersion.HasValue()) + { + blobItem.IsCurrentVersion = false; + } + } + if (blobItem.BlobType == Models::BlobType::AppendBlob + && !blobItem.Details.IsSealed.HasValue()) + { + blobItem.Details.IsSealed = false; + } + if (blobItem.Details.CopyStatus.HasValue() && !blobItem.Details.IsIncrementalCopy.HasValue()) + { + blobItem.Details.IsIncrementalCopy = false; + } + { + /* + * Object replication metadata is in the following format. + * + * replication status + * <...> + * + * + * We'll convert the metadata to a vector of policies, each policy being a vector of rules. + */ + std::map> orPropertiesMap; + for (auto& policy : blobItem.Details.ObjectReplicationSourceProperties) + { + for (auto& rule : policy.Rules) + { + auto underscorePos = rule.RuleId.find('_', 3); + std::string policyId + = std::string(rule.RuleId.begin() + 3, rule.RuleId.begin() + underscorePos); + std::string ruleId = rule.RuleId.substr(underscorePos + 1); + rule.RuleId = ruleId; + orPropertiesMap[policyId].emplace_back(std::move(rule)); + } + } + blobItem.Details.ObjectReplicationSourceProperties.clear(); + for (auto& property : orPropertiesMap) + { + Models::ObjectReplicationPolicy policy; + policy.PolicyId = property.first; + policy.Rules = std::move(property.second); + blobItem.Details.ObjectReplicationSourceProperties.emplace_back(std::move(policy)); + } + } + return blobItem; + } + } // namespace + BlobContainerClient BlobContainerClient::CreateFromConnectionString( const std::string& connectionString, const std::string& blobContainerName, @@ -271,61 +352,15 @@ namespace Azure { namespace Storage { namespace Blobs { m_blobContainerUrl, protocolLayerOptions, _internal::WithReplicaStatus(context)); - for (auto& i : response.Value.Items) - { - if (i.Details.AccessTier.HasValue() && !i.Details.IsAccessTierInferred.HasValue()) - { - i.Details.IsAccessTierInferred = false; - } - if (i.VersionId.HasValue()) - { - if (!i.HasVersionsOnly.HasValue()) - { - i.HasVersionsOnly = false; - } - if (!i.IsCurrentVersion.HasValue()) - { - i.IsCurrentVersion = false; - } - } - if (i.BlobType == Models::BlobType::AppendBlob && !i.Details.IsSealed.HasValue()) - { - i.Details.IsSealed = false; - } - if (i.Details.CopyStatus.HasValue() && !i.Details.IsIncrementalCopy.HasValue()) - { - i.Details.IsIncrementalCopy = false; - } - { - std::map> orPropertiesMap; - for (auto& policy : i.Details.ObjectReplicationSourceProperties) - { - for (auto& rule : policy.Rules) - { - auto underscorePos = rule.RuleId.find('_', 3); - std::string policyId - = std::string(rule.RuleId.begin() + 3, rule.RuleId.begin() + underscorePos); - std::string ruleId = rule.RuleId.substr(underscorePos + 1); - rule.RuleId = ruleId; - orPropertiesMap[policyId].emplace_back(std::move(rule)); - } - } - i.Details.ObjectReplicationSourceProperties.clear(); - for (auto& property : orPropertiesMap) - { - Models::ObjectReplicationPolicy policy; - policy.PolicyId = property.first; - policy.Rules = std::move(property.second); - i.Details.ObjectReplicationSourceProperties.emplace_back(std::move(policy)); - } - } - } ListBlobsPagedResponse pagedResponse; pagedResponse.ServiceEndpoint = std::move(response.Value.ServiceEndpoint); pagedResponse.BlobContainerName = std::move(response.Value.BlobContainerName); pagedResponse.Prefix = std::move(response.Value.Prefix); - pagedResponse.Blobs = std::move(response.Value.Items); + for (auto& i : response.Value.Items) + { + pagedResponse.Blobs.push_back(BlobItemConversion(i)); + } pagedResponse.m_blobContainerClient = std::make_shared(*this); pagedResponse.m_operationOptions = options; pagedResponse.CurrentPageToken = options.ContinuationToken.ValueOr(std::string()); @@ -351,55 +386,6 @@ namespace Azure { namespace Storage { namespace Blobs { m_blobContainerUrl, protocolLayerOptions, _internal::WithReplicaStatus(context)); - for (auto& i : response.Value.Items) - { - if (i.Details.AccessTier.HasValue() && !i.Details.IsAccessTierInferred.HasValue()) - { - i.Details.IsAccessTierInferred = false; - } - if (i.VersionId.HasValue()) - { - if (!i.HasVersionsOnly.HasValue()) - { - i.HasVersionsOnly = false; - } - if (!i.IsCurrentVersion.HasValue()) - { - i.IsCurrentVersion = false; - } - } - if (i.BlobType == Models::BlobType::AppendBlob && !i.Details.IsSealed.HasValue()) - { - i.Details.IsSealed = false; - } - if (i.Details.CopyStatus.HasValue() && !i.Details.IsIncrementalCopy.HasValue()) - { - i.Details.IsIncrementalCopy = false; - } - { - std::map> orPropertiesMap; - for (auto& policy : i.Details.ObjectReplicationSourceProperties) - { - for (auto& rule : policy.Rules) - { - auto underscorePos = rule.RuleId.find('_', 3); - std::string policyId - = std::string(rule.RuleId.begin() + 3, rule.RuleId.begin() + underscorePos); - std::string ruleId = rule.RuleId.substr(underscorePos + 1); - rule.RuleId = ruleId; - orPropertiesMap[policyId].emplace_back(std::move(rule)); - } - } - i.Details.ObjectReplicationSourceProperties.clear(); - for (auto& property : orPropertiesMap) - { - Models::ObjectReplicationPolicy policy; - policy.PolicyId = property.first; - policy.Rules = std::move(property.second); - i.Details.ObjectReplicationSourceProperties.emplace_back(std::move(policy)); - } - } - } ListBlobsByHierarchyPagedResponse pagedResponse; @@ -407,8 +393,21 @@ namespace Azure { namespace Storage { namespace Blobs { pagedResponse.BlobContainerName = std::move(response.Value.BlobContainerName); pagedResponse.Prefix = std::move(response.Value.Prefix); pagedResponse.Delimiter = std::move(response.Value.Delimiter); - pagedResponse.Blobs = std::move(response.Value.Items); - pagedResponse.BlobPrefixes = std::move(response.Value.BlobPrefixes); + for (auto& i : response.Value.Items) + { + pagedResponse.Blobs.push_back(BlobItemConversion(i)); + } + for (auto& i : response.Value.BlobPrefixes) + { + if (i.Encoded) + { + pagedResponse.BlobPrefixes.push_back(Core::Url::Decode(i.Content)); + } + else + { + pagedResponse.BlobPrefixes.push_back(std::move(i.Content)); + } + } pagedResponse.m_blobContainerClient = std::make_shared(*this); pagedResponse.m_operationOptions = options; pagedResponse.m_delimiter = delimiter; @@ -467,6 +466,34 @@ namespace Azure { namespace Storage { namespace Blobs { std::move(blockBlobClient), std::move(response.RawResponse)); } + FindBlobsByTagsPagedResponse BlobContainerClient::FindBlobsByTags( + const std::string& tagFilterSqlExpression, + const FindBlobsByTagsOptions& options, + const Azure::Core::Context& context) const + { + _detail::BlobContainerClient::FindBlobContainerBlobsByTagsOptions protocolLayerOptions; + protocolLayerOptions.Where = tagFilterSqlExpression; + protocolLayerOptions.Marker = options.ContinuationToken; + protocolLayerOptions.MaxResults = options.PageSizeHint; + auto response = _detail::BlobContainerClient::FindBlobsByTags( + *m_pipeline, + m_blobContainerUrl, + protocolLayerOptions, + _internal::WithReplicaStatus(context)); + + FindBlobsByTagsPagedResponse pagedResponse; + pagedResponse.ServiceEndpoint = std::move(response.Value.ServiceEndpoint); + pagedResponse.TaggedBlobs = std::move(response.Value.Items); + pagedResponse.m_blobContainerClient = std::make_shared(*this); + pagedResponse.m_operationOptions = options; + pagedResponse.m_tagFilterSqlExpression = tagFilterSqlExpression; + pagedResponse.CurrentPageToken = options.ContinuationToken.ValueOr(std::string()); + pagedResponse.NextPageToken = response.Value.ContinuationToken; + pagedResponse.RawResponse = std::move(response.RawResponse); + + return pagedResponse; + } + BlobContainerBatch BlobContainerClient::CreateBatch() const { return BlobContainerBatch(*this); } Response BlobContainerClient::SubmitBatch( @@ -487,5 +514,4 @@ namespace Azure { namespace Storage { namespace Blobs { return Azure::Response( Models::SubmitBlobBatchResult(), std::move(response.RawResponse)); } - }}} // namespace Azure::Storage::Blobs diff --git a/sdk/storage/azure-storage-blobs/src/blob_responses.cpp b/sdk/storage/azure-storage-blobs/src/blob_responses.cpp index a8f5269d65..bc736cbd4c 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_responses.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_responses.cpp @@ -70,8 +70,16 @@ namespace Azure { namespace Storage { namespace Blobs { void FindBlobsByTagsPagedResponse::OnNextPage(const Azure::Core::Context& context) { m_operationOptions.ContinuationToken = NextPageToken; - *this = m_blobServiceClient->FindBlobsByTags( - m_tagFilterSqlExpression, m_operationOptions, context); + if (m_blobServiceClient) + { + *this = m_blobServiceClient->FindBlobsByTags( + m_tagFilterSqlExpression, m_operationOptions, context); + } + else + { + *this = m_blobContainerClient->FindBlobsByTags( + m_tagFilterSqlExpression, m_operationOptions, context); + } } void ListBlobsPagedResponse::OnNextPage(const Azure::Core::Context& context) diff --git a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp index 35d7677df0..c629933eab 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp @@ -67,6 +67,11 @@ namespace Azure { namespace Storage { namespace Sas { { Permissions += "x"; } + if ((permissions & BlobContainerSasPermissions::PermanentDelete) + == BlobContainerSasPermissions::PermanentDelete) + { + Permissions += "y"; + } if ((permissions & BlobContainerSasPermissions::List) == BlobContainerSasPermissions::List) { Permissions += "l"; @@ -110,6 +115,10 @@ namespace Azure { namespace Storage { namespace Sas { { Permissions += "x"; } + if ((permissions & BlobSasPermissions::PermanentDelete) == BlobSasPermissions::PermanentDelete) + { + Permissions += "y"; + } if ((permissions & BlobSasPermissions::Tags) == BlobSasPermissions::Tags) { Permissions += "t"; @@ -154,8 +163,8 @@ namespace Azure { namespace Storage { namespace Sas { std::string stringToSign = Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n" + Identifier + "\n" + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n" - + CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage - + "\n" + ContentType; + + EncryptionScope + "\n" + CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding + + "\n" + ContentLanguage + "\n" + ContentType; std::string signature = Azure::Core::Convert::Base64Encode(_internal::HmacSha256( std::vector(stringToSign.begin(), stringToSign.end()), @@ -206,6 +215,10 @@ namespace Azure { namespace Storage { namespace Sas { { builder.AppendQueryParameter("rsct", _internal::UrlEncodeQueryParameter(ContentType)); } + if (!EncryptionScope.empty()) + { + builder.AppendQueryParameter("ses", _internal::UrlEncodeQueryParameter(EncryptionScope)); + } return builder.GetAbsoluteUrl(); } @@ -249,8 +262,9 @@ namespace Azure { namespace Storage { namespace Sas { + userDelegationKey.SignedTenantId + "\n" + signedStartsOnStr + "\n" + signedExpiresOnStr + "\n" + userDelegationKey.SignedService + "\n" + userDelegationKey.SignedVersion + "\n\n\n\n" + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" - + SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n" + CacheControl + "\n" - + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType; + + SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n" + EncryptionScope + "\n" + + CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + + "\n" + ContentType; std::string signature = Azure::Core::Convert::Base64Encode(_internal::HmacSha256( std::vector(stringToSign.begin(), stringToSign.end()), @@ -300,6 +314,10 @@ namespace Azure { namespace Storage { namespace Sas { { builder.AppendQueryParameter("rsct", _internal::UrlEncodeQueryParameter(ContentType)); } + if (!EncryptionScope.empty()) + { + builder.AppendQueryParameter("ses", _internal::UrlEncodeQueryParameter(EncryptionScope)); + } builder.AppendQueryParameter("sig", _internal::UrlEncodeQueryParameter(signature)); return builder.GetAbsoluteUrl(); diff --git a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp index 9e14727dfd..9aefdafc0e 100644 --- a/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/block_blob_client.cpp @@ -378,6 +378,7 @@ namespace Azure { namespace Storage { namespace Blobs { protocolLayerOptions.EncryptionAlgorithm = m_customerProvidedKey.Value().Algorithm.ToString(); } protocolLayerOptions.EncryptionScope = m_encryptionScope; + protocolLayerOptions.CopySourceTags = options.CopySourceTagsMode; return _detail::BlockBlobClient::UploadFromUri( *m_pipeline, m_blobUrl, protocolLayerOptions, context); } diff --git a/sdk/storage/azure-storage-blobs/src/rest_client.cpp b/sdk/storage/azure-storage-blobs/src/rest_client.cpp index 4fdcad2249..1678ac9b72 100644 --- a/sdk/storage/azure-storage-blobs/src/rest_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/rest_client.cpp @@ -170,6 +170,8 @@ namespace Azure { namespace Storage { namespace Blobs { "RelativeToCreation"); const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::RelativeToNow("RelativeToNow"); const ScheduleBlobExpiryOriginType ScheduleBlobExpiryOriginType::Absolute("Absolute"); + const BlobCopySourceTagsMode BlobCopySourceTagsMode::Replace("REPLACE"); + const BlobCopySourceTagsMode BlobCopySourceTagsMode::Copy("COPY"); namespace _detail { const QueryRequestQueryType QueryRequestQueryType::SQL("SQL"); const QueryFormatType QueryFormatType::Delimited("delimited"); @@ -374,7 +376,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -394,7 +396,7 @@ namespace Azure { namespace Storage { namespace Blobs { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -690,7 +692,7 @@ namespace Azure { namespace Storage { namespace Blobs { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "stats"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -790,7 +792,7 @@ namespace Azure { namespace Storage { namespace Blobs { _internal::UrlEncodeQueryParameter( ListBlobContainersIncludeFlagsToString(options.Include.Value()))); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1075,7 +1077,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("restype", "service"); request.GetUrl().AppendQueryParameter("comp", "userdelegationkey"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1190,7 +1192,7 @@ namespace Azure { namespace Storage { namespace Blobs { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("restype", "account"); request.GetUrl().AppendQueryParameter("comp", "properties"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -1220,7 +1222,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("Content-Type", options.MultipartContentType); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -1241,7 +1243,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("comp", "blobs"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.Where.HasValue() && !options.Where.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -1397,7 +1399,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-blob-public-access", options.Access.ToString()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.DefaultEncryptionScope.HasValue() && !options.DefaultEncryptionScope.Value().empty()) { @@ -1434,7 +1436,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1512,7 +1514,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -1546,7 +1548,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Modified-Since", options.IfModifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1573,7 +1575,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1742,7 +1744,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1765,7 +1767,7 @@ namespace Azure { namespace Storage { namespace Blobs { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "container"); request.GetUrl().AppendQueryParameter("comp", "undelete"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.DeletedContainerName.HasValue() && !options.DeletedContainerName.Value().empty()) { request.SetHeader("x-ms-deleted-container-name", options.DeletedContainerName.Value()); @@ -1795,7 +1797,7 @@ namespace Azure { namespace Storage { namespace Blobs { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("restype", "container"); request.GetUrl().AppendQueryParameter("comp", "rename"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (!options.SourceContainerName.empty()) { request.SetHeader("x-ms-source-container-name", options.SourceContainerName); @@ -1829,7 +1831,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("Content-Type", options.MultipartContentType); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -1842,6 +1844,155 @@ namespace Azure { namespace Storage { namespace Blobs { return Response( std::move(response), std::move(pRawResponse)); } + Response BlobContainerClient::FindBlobsByTags( + Core::Http::_internal::HttpPipeline& pipeline, + const Core::Url& url, + const FindBlobContainerBlobsByTagsOptions& options, + const Core::Context& context) + { + auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); + request.GetUrl().AppendQueryParameter("restype", "container"); + request.GetUrl().AppendQueryParameter("comp", "blobs"); + request.SetHeader("x-ms-version", "2021-04-10"); + if (options.Where.HasValue() && !options.Where.Value().empty()) + { + request.GetUrl().AppendQueryParameter( + "where", _internal::UrlEncodeQueryParameter(options.Where.Value())); + } + if (options.Marker.HasValue() && !options.Marker.Value().empty()) + { + request.GetUrl().AppendQueryParameter( + "marker", _internal::UrlEncodeQueryParameter(options.Marker.Value())); + } + if (options.MaxResults.HasValue()) + { + request.GetUrl().AppendQueryParameter( + "maxresults", std::to_string(options.MaxResults.Value())); + } + auto pRawResponse = pipeline.Send(request, context); + auto httpStatusCode = pRawResponse->GetStatusCode(); + if (httpStatusCode != Core::Http::HttpStatusCode::Ok) + { + throw StorageException::CreateFromResponse(std::move(pRawResponse)); + } + Models::_detail::FindBlobsByTagsResult response; + { + const auto& responseBody = pRawResponse->GetBody(); + _internal::XmlReader reader( + reinterpret_cast(responseBody.data()), responseBody.size()); + enum class XmlTagEnum + { + kUnknown, + kEnumerationResults, + kBlobs, + kBlob, + kName, + kContainerName, + kTags, + kTagSet, + kTag, + kKey, + kValue, + kNextMarker, + }; + const std::unordered_map XmlTagEnumMap{ + {"EnumerationResults", XmlTagEnum::kEnumerationResults}, + {"Blobs", XmlTagEnum::kBlobs}, + {"Blob", XmlTagEnum::kBlob}, + {"Name", XmlTagEnum::kName}, + {"ContainerName", XmlTagEnum::kContainerName}, + {"Tags", XmlTagEnum::kTags}, + {"TagSet", XmlTagEnum::kTagSet}, + {"Tag", XmlTagEnum::kTag}, + {"Key", XmlTagEnum::kKey}, + {"Value", XmlTagEnum::kValue}, + {"NextMarker", XmlTagEnum::kNextMarker}, + }; + std::vector xmlPath; + Models::TaggedBlobItem vectorElement1; + std::string mapKey2; + std::string mapValue3; + while (true) + { + auto node = reader.Read(); + if (node.Type == _internal::XmlNodeType::End) + { + break; + } + else if (node.Type == _internal::XmlNodeType::StartTag) + { + auto ite = XmlTagEnumMap.find(node.Name); + xmlPath.push_back(ite == XmlTagEnumMap.end() ? XmlTagEnum::kUnknown : ite->second); + } + else if (node.Type == _internal::XmlNodeType::Text) + { + if (xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kName) + { + vectorElement1.BlobName = node.Value; + } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kContainerName) + { + vectorElement1.BlobContainerName = node.Value; + } + else if ( + xmlPath.size() == 7 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kTags && xmlPath[4] == XmlTagEnum::kTagSet + && xmlPath[5] == XmlTagEnum::kTag && xmlPath[6] == XmlTagEnum::kKey) + { + mapKey2 = node.Value; + } + else if ( + xmlPath.size() == 7 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kTags && xmlPath[4] == XmlTagEnum::kTagSet + && xmlPath[5] == XmlTagEnum::kTag && xmlPath[6] == XmlTagEnum::kValue) + { + mapValue3 = node.Value; + } + else if ( + xmlPath.size() == 2 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kNextMarker) + { + response.ContinuationToken = node.Value; + } + } + else if (node.Type == _internal::XmlNodeType::Attribute) + { + if (xmlPath.size() == 1 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && node.Name == "ServiceEndpoint") + { + response.ServiceEndpoint = node.Value; + } + } + else if (node.Type == _internal::XmlNodeType::EndTag) + { + if (xmlPath.size() == 7 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kTags && xmlPath[4] == XmlTagEnum::kTagSet + && xmlPath[5] == XmlTagEnum::kTag && xmlPath[6] == XmlTagEnum::kValue) + { + vectorElement1.Tags[std::move(mapKey2)] = std::move(mapValue3); + } + else if ( + xmlPath.size() == 3 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob) + { + response.Items.push_back(std::move(vectorElement1)); + vectorElement1 = Models::TaggedBlobItem(); + } + xmlPath.pop_back(); + } + } + } + return Response( + std::move(response), std::move(pRawResponse)); + } Response BlobContainerClient::AcquireLease( Core::Http::_internal::HttpPipeline& pipeline, const Core::Url& url, @@ -1872,7 +2023,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -1913,7 +2064,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1953,7 +2104,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -1994,7 +2145,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -2039,7 +2190,7 @@ namespace Azure { namespace Storage { namespace Blobs { "If-Unmodified-Since", options.IfUnmodifiedSince.Value().ToString(Azure::DateTime::DateFormat::Rfc1123)); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2086,7 +2237,7 @@ namespace Azure { namespace Storage { namespace Blobs { _internal::UrlEncodeQueryParameter( ListBlobsIncludeFlagsToString(options.Include.Value()))); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2221,7 +2372,7 @@ namespace Azure { namespace Storage { namespace Blobs { {"BlobType", XmlTagEnum::kBlobType}, }; std::vector xmlPath; - Models::BlobItem vectorElement1; + Models::_detail::BlobItem vectorElement1; std::string mapKey2; std::string mapValue3; std::string mapKey4; @@ -2285,7 +2436,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob && xmlPath[3] == XmlTagEnum::kName) { - vectorElement1.Name = node.Value; + vectorElement1.Name.Content = node.Value; } else if ( xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults @@ -2670,6 +2821,13 @@ namespace Azure { namespace Storage { namespace Blobs { { response.BlobContainerName = node.Value; } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kName && node.Name == "Encoded") + { + vectorElement1.Name.Encoded = node.Value == std::string("true"); + } } else if (node.Type == _internal::XmlNodeType::EndTag) { @@ -2703,7 +2861,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob) { response.Items.push_back(std::move(vectorElement1)); - vectorElement1 = Models::BlobItem(); + vectorElement1 = Models::_detail::BlobItem(); } xmlPath.pop_back(); } @@ -2749,7 +2907,7 @@ namespace Azure { namespace Storage { namespace Blobs { _internal::UrlEncodeQueryParameter( ListBlobsIncludeFlagsToString(options.Include.Value()))); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2888,14 +3046,14 @@ namespace Azure { namespace Storage { namespace Blobs { {"BlobPrefix", XmlTagEnum::kBlobPrefix}, }; std::vector xmlPath; - Models::BlobItem vectorElement1; + Models::_detail::BlobItem vectorElement1; std::string mapKey2; std::string mapValue3; std::string mapKey4; std::string mapValue5; Models::ObjectReplicationPolicy vectorElement6; Models::ObjectReplicationRule vectorElement7; - std::string vectorElement8; + Models::_detail::BlobName vectorElement8; while (true) { auto node = reader.Read(); @@ -2959,7 +3117,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob && xmlPath[3] == XmlTagEnum::kName) { - vectorElement1.Name = node.Value; + vectorElement1.Name.Content = node.Value; } else if ( xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults @@ -3335,7 +3493,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlobPrefix && xmlPath[3] == XmlTagEnum::kName) { - vectorElement8 = node.Value; + vectorElement8.Content = node.Value; } } else if (node.Type == _internal::XmlNodeType::Attribute) @@ -3351,6 +3509,20 @@ namespace Azure { namespace Storage { namespace Blobs { { response.BlobContainerName = node.Value; } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kName && node.Name == "Encoded") + { + vectorElement1.Name.Encoded = node.Value == std::string("true"); + } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlobPrefix + && xmlPath[3] == XmlTagEnum::kName && node.Name == "Encoded") + { + vectorElement8.Encoded = node.Value == std::string("true"); + } } else if (node.Type == _internal::XmlNodeType::EndTag) { @@ -3384,7 +3556,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob) { response.Items.push_back(std::move(vectorElement1)); - vectorElement1 = Models::BlobItem(); + vectorElement1 = Models::_detail::BlobItem(); } else if ( xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults @@ -3392,7 +3564,7 @@ namespace Azure { namespace Storage { namespace Blobs { && xmlPath[3] == XmlTagEnum::kName) { response.BlobPrefixes.push_back(std::move(vectorElement8)); - vectorElement8 = std::string(); + vectorElement8 = Models::_detail::BlobName(); } xmlPath.pop_back(); } @@ -3476,7 +3648,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (!(httpStatusCode == Core::Http::HttpStatusCode::Ok @@ -3486,8 +3658,11 @@ namespace Azure { namespace Storage { namespace Blobs { } Models::DownloadBlobResult response; response.BodyStream = pRawResponse->ExtractBodyStream(); - response.Details.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.Details.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } for (auto i = pRawResponse->GetHeaders().lower_bound("x-ms-meta-"); i != pRawResponse->GetHeaders().end() && i->first.substr(0, 10) == "x-ms-meta-"; ++i) @@ -3503,7 +3678,10 @@ namespace Azure { namespace Storage { namespace Blobs { { response.Details.HttpHeaders.ContentType = pRawResponse->GetHeaders().at("Content-Type"); } - response.Details.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.Details.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } if (pRawResponse->GetHeaders().count("Content-Encoding") != 0) { response.Details.HttpHeaders.ContentEncoding @@ -3746,7 +3924,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -3754,8 +3932,11 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::BlobProperties response; - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.CreatedOn = DateTime::Parse( pRawResponse->GetHeaders().at("x-ms-creation-time"), Azure::DateTime::DateFormat::Rfc1123); @@ -3827,7 +4008,10 @@ namespace Azure { namespace Storage { namespace Blobs { { response.HttpHeaders.ContentType = pRawResponse->GetHeaders().at("Content-Type"); } - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } if (pRawResponse->GetHeaders().count("Content-MD5") != 0) { response.HttpHeaders.ContentHash.Value @@ -4002,7 +4186,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -4020,7 +4204,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "undelete"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -4039,7 +4223,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "expiry"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (!options.ExpiryOptions.ToString().empty()) { request.SetHeader("x-ms-expiry-option", options.ExpiryOptions.ToString()); @@ -4055,9 +4239,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::SetBlobExpiryResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } return Response(std::move(response), std::move(pRawResponse)); } Response BlobClient::SetHttpHeaders( @@ -4121,7 +4311,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-blob-content-disposition", options.BlobContentDisposition); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -4129,9 +4319,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::SetBlobHttpHeadersResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-blob-sequence-number") != 0) { response.SequenceNumber @@ -4148,7 +4344,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "immutabilityPolicies"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.IfUnmodifiedSince.HasValue()) { request.SetHeader( @@ -4191,7 +4387,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Delete, url); request.GetUrl().AppendQueryParameter("comp", "immutabilityPolicies"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); (void)options; auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -4211,7 +4407,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "legalhold"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); request.SetHeader("x-ms-legal-hold", options.LegalHold ? "true" : "false"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); @@ -4283,7 +4479,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -4291,9 +4487,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::SetBlobMetadataResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) { response.VersionId = pRawResponse->GetHeaders().at("x-ms-version-id"); @@ -4352,7 +4554,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -4360,9 +4562,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::AcquireBlobLeaseResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.LeaseId = pRawResponse->GetHeaders().at("x-ms-lease-id"); return Response( std::move(response), std::move(pRawResponse)); @@ -4404,7 +4612,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -4412,9 +4620,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::ReleaseBlobLeaseResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } return Response( std::move(response), std::move(pRawResponse)); } @@ -4455,7 +4669,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -4463,9 +4677,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::RenewBlobLeaseResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.LeaseId = pRawResponse->GetHeaders().at("x-ms-lease-id"); return Response( std::move(response), std::move(pRawResponse)); @@ -4511,7 +4731,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -4519,9 +4739,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::ChangeBlobLeaseResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.LeaseId = pRawResponse->GetHeaders().at("x-ms-lease-id"); return Response( std::move(response), std::move(pRawResponse)); @@ -4563,7 +4789,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -4571,9 +4797,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::BreakBlobLeaseResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.LeaseTime = std::stoi(pRawResponse->GetHeaders().at("x-ms-lease-time")); return Response( std::move(response), std::move(pRawResponse)); @@ -4637,7 +4869,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -4646,9 +4878,15 @@ namespace Azure { namespace Storage { namespace Blobs { } Models::CreateBlobSnapshotResult response; response.Snapshot = pRawResponse->GetHeaders().at("x-ms-snapshot"); - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) { response.VersionId = pRawResponse->GetHeaders().at("x-ms-version-id"); @@ -4738,7 +4976,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.BlobTagsString.HasValue() && !options.BlobTagsString.Value().empty()) { request.SetHeader("x-ms-tags", options.BlobTagsString.Value()); @@ -4771,9 +5009,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::StartBlobCopyFromUriResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) { response.VersionId = pRawResponse->GetHeaders().at("x-ms-version-id"); @@ -4851,7 +5095,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.SourceContentMD5.HasValue() && !Core::Convert::Base64Encode(options.SourceContentMD5.Value()).empty()) { @@ -4886,6 +5130,14 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-copy-source-authorization", options.CopySourceAuthorization.Value()); } + if (options.EncryptionScope.HasValue() && !options.EncryptionScope.Value().empty()) + { + request.SetHeader("x-ms-encryption-scope", options.EncryptionScope.Value()); + } + if (options.CopySourceTags.HasValue() && !options.CopySourceTags.Value().ToString().empty()) + { + request.SetHeader("x-ms-copy-source-tag-option", options.CopySourceTags.Value().ToString()); + } if (options.SourceContentcrc64.HasValue() && !Core::Convert::Base64Encode(options.SourceContentcrc64.Value()).empty()) { @@ -4900,9 +5152,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::CopyBlobFromUriResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) { response.VersionId = pRawResponse->GetHeaders().at("x-ms-version-id"); @@ -4923,6 +5181,10 @@ namespace Azure { namespace Storage { namespace Blobs { = Core::Convert::Base64Decode(pRawResponse->GetHeaders().at("x-ms-content-crc64")); response.TransactionalContentHash.Value().Algorithm = HashAlgorithm::Crc64; } + if (pRawResponse->GetHeaders().count("x-ms-encryption-scope") != 0) + { + response.EncryptionScope = pRawResponse->GetHeaders().at("x-ms-encryption-scope"); + } return Response(std::move(response), std::move(pRawResponse)); } Response BlobClient::AbortCopyFromUri( @@ -4943,7 +5205,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::NoContent) @@ -4981,7 +5243,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-rehydrate-priority", options.RehydratePriority.Value().ToString()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -5283,7 +5545,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.EncryptionScope.HasValue() && !options.EncryptionScope.Value().empty()) { request.SetHeader("x-ms-encryption-scope", options.EncryptionScope.Value()); @@ -5297,9 +5559,15 @@ namespace Azure { namespace Storage { namespace Blobs { } Models::QueryBlobResult response; response.BodyStream = pRawResponse->ExtractBodyStream(); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } if (pRawResponse->GetHeaders().count("x-ms-lease-duration") != 0) { response.LeaseDuration @@ -5320,7 +5588,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Get, url); request.GetUrl().AppendQueryParameter("comp", "tags"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.Snapshot.HasValue() && !options.Snapshot.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -5447,7 +5715,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader("Content-Type", "application/xml; charset=UTF-8"); request.SetHeader("Content-Length", std::to_string(requestBody.Length())); request.GetUrl().AppendQueryParameter("comp", "tags"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.VersionId.HasValue() && !options.VersionId.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -5578,7 +5846,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-blob-sequence-number", std::to_string(options.BlobSequenceNumber.Value())); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.BlobTagsString.HasValue() && !options.BlobTagsString.Value().empty()) { request.SetHeader("x-ms-tags", options.BlobTagsString.Value()); @@ -5607,9 +5875,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::CreatePageBlobResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) { response.VersionId = pRawResponse->GetHeaders().at("x-ms-version-id"); @@ -5718,7 +5992,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -5726,9 +6000,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::UploadPagesResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("Content-MD5") != 0) { response.TransactionalContentHash = ContentHash(); @@ -5835,7 +6115,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -5843,9 +6123,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::ClearPagesResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.SequenceNumber = std::stoll(pRawResponse->GetHeaders().at("x-ms-blob-sequence-number")); return Response(std::move(response), std::move(pRawResponse)); @@ -5969,7 +6255,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-source-if-none-match", options.SourceIfNoneMatch.ToString()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.CopySourceAuthorization.HasValue() && !options.CopySourceAuthorization.Value().empty()) { @@ -5983,9 +6269,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::UploadPagesFromUriResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } if (pRawResponse->GetHeaders().count("Content-MD5") != 0) { response.TransactionalContentHash = ContentHash(); @@ -6061,7 +6353,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.Marker.HasValue() && !options.Marker.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -6172,9 +6464,15 @@ namespace Azure { namespace Storage { namespace Blobs { } } } - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } response.BlobSize = std::stoll(pRawResponse->GetHeaders().at("x-ms-blob-content-length")); return Response( std::move(response), std::move(pRawResponse)); @@ -6233,7 +6531,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.Marker.HasValue() && !options.Marker.Value().empty()) { request.GetUrl().AppendQueryParameter( @@ -6344,9 +6642,15 @@ namespace Azure { namespace Storage { namespace Blobs { } } } - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } response.BlobSize = std::stoll(pRawResponse->GetHeaders().at("x-ms-blob-content-length")); return Response( std::move(response), std::move(pRawResponse)); @@ -6407,7 +6711,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } request.SetHeader("x-ms-blob-content-length", std::to_string(options.BlobContentLength)); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -6415,9 +6719,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::ResizePageBlobResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.SequenceNumber = std::stoll(pRawResponse->GetHeaders().at("x-ms-blob-sequence-number")); return Response(std::move(response), std::move(pRawResponse)); @@ -6467,7 +6777,7 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-blob-sequence-number", std::to_string(options.BlobSequenceNumber.Value())); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -6475,9 +6785,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::UpdateSequenceNumberResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.SequenceNumber = std::stoll(pRawResponse->GetHeaders().at("x-ms-blob-sequence-number")); return Response( @@ -6519,7 +6835,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-copy-source", options.CopySource); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Accepted) @@ -6527,9 +6843,15 @@ namespace Azure { namespace Storage { namespace Blobs { throw StorageException::CreateFromResponse(std::move(pRawResponse)); } Models::_detail::StartBlobCopyIncrementalResult response; - response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); - response.LastModified = DateTime::Parse( - pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + if (pRawResponse->GetHeaders().count("ETag") != 0) + { + response.ETag = ETag(pRawResponse->GetHeaders().at("ETag")); + } + if (pRawResponse->GetHeaders().count("Last-Modified") != 0) + { + response.LastModified = DateTime::Parse( + pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123); + } response.CopyId = pRawResponse->GetHeaders().at("x-ms-copy-id"); response.CopyStatus = Models::CopyStatus(pRawResponse->GetHeaders().at("x-ms-copy-status")); if (pRawResponse->GetHeaders().count("x-ms-version-id") != 0) @@ -6624,7 +6946,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.BlobTagsString.HasValue() && !options.BlobTagsString.Value().empty()) { request.SetHeader("x-ms-tags", options.BlobTagsString.Value()); @@ -6752,7 +7074,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -6906,7 +7228,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-source-if-none-match", options.SourceIfNoneMatch.ToString()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.CopySourceAuthorization.HasValue() && !options.CopySourceAuthorization.Value().empty()) { @@ -6962,7 +7284,7 @@ namespace Azure { namespace Storage { namespace Blobs { { auto request = Core::Http::Request(Core::Http::HttpMethod::Put, url); request.GetUrl().AppendQueryParameter("comp", "seal"); - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.LeaseId.HasValue() && !options.LeaseId.Value().empty()) { request.SetHeader("x-ms-lease-id", options.LeaseId.Value()); @@ -7101,7 +7423,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.BlobTagsString.HasValue() && !options.BlobTagsString.Value().empty()) { request.SetHeader("x-ms-tags", options.BlobTagsString.Value()); @@ -7284,7 +7606,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-source-if-tags", options.SourceIfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.SourceContentMD5.HasValue() && !Core::Convert::Base64Encode(options.SourceContentMD5.Value()).empty()) { @@ -7312,6 +7634,10 @@ namespace Azure { namespace Storage { namespace Blobs { request.SetHeader( "x-ms-copy-source-authorization", options.CopySourceAuthorization.Value()); } + if (options.CopySourceTags.HasValue() && !options.CopySourceTags.Value().ToString().empty()) + { + request.SetHeader("x-ms-copy-source-tag-option", options.CopySourceTags.Value().ToString()); + } if (options.SourceContentcrc64.HasValue() && !Core::Convert::Base64Encode(options.SourceContentcrc64.Value()).empty()) { @@ -7412,7 +7738,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-encryption-scope", options.EncryptionScope.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Created) @@ -7526,7 +7852,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-source-if-none-match", options.SourceIfNoneMatch.ToString()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.CopySourceAuthorization.HasValue() && !options.CopySourceAuthorization.Value().empty()) { @@ -7693,7 +8019,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); if (options.BlobTagsString.HasValue() && !options.BlobTagsString.Value().empty()) { request.SetHeader("x-ms-tags", options.BlobTagsString.Value()); @@ -7782,7 +8108,7 @@ namespace Azure { namespace Storage { namespace Blobs { { request.SetHeader("x-ms-if-tags", options.IfTags.Value()); } - request.SetHeader("x-ms-version", "2020-10-02"); + request.SetHeader("x-ms-version", "2021-04-10"); auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) diff --git a/sdk/storage/azure-storage-blobs/swagger/README.md b/sdk/storage/azure-storage-blobs/swagger/README.md index 2a31bd673f..2b34011ca2 100644 --- a/sdk/storage/azure-storage-blobs/swagger/README.md +++ b/sdk/storage/azure-storage-blobs/swagger/README.md @@ -9,7 +9,7 @@ package-name: azure-storage-blobs namespace: Azure::Storage::Blobs output-folder: generated clear-output-folder: true -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-10-02/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-04-10/blob.json ``` ## ModelFour Options @@ -102,7 +102,7 @@ directive: "name": "ApiVersion", "modelAsString": false }, - "enum": ["2020-10-02"], + "enum": ["2021-04-10"], "description": "The version used for the operations to Azure storage services." }; ``` @@ -116,6 +116,7 @@ directive: transform: > $["/?comp=list"].get.operationId = "Service_ListBlobContainers"; $["/?comp=blobs"].get.operationId = "Service_FindBlobsByTags"; + $["/{containerName}?restype=container&comp=blobs"].get.operationId = "BlobContainer_FindBlobsByTags"; $["/{containerName}/{blob}?comp=incrementalcopy"].put.operationId = "PageBlob_StartCopyIncremental"; $["/{containerName}?restype=container&comp=list&flat"].get.operationId = "BlobContainer_ListBlobs"; $["/{containerName}?restype=container&comp=list&hierarchy"].get.operationId = "BlobContainer_ListBlobsByHierarchy"; @@ -279,6 +280,7 @@ directive: delete $.EncryptionAlgorithm["enum"]; delete $.EncryptionAlgorithm["x-ms-enum"]; $.ImmutabilityPolicyMode.enum = $.ImmutabilityPolicyMode.enum.map(e => e.toLowerCase()); + $.CopySourceTags["x-ms-enum"]["name"] = "BlobCopySourceTagsMode"; - from: swagger-document where: $.definitions transform: > @@ -467,6 +469,54 @@ directive: $.ArchiveStatus.description = "For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not complete then this value indicates that rehydrate is pending and also tells the destination tier."; ``` +### Striped Blob Support + +```yaml +directive: + - from: swagger-document + where: $ + transform: > + const operations = [ + "Blob_GetProperties", + "Blob_Download", + "Blob_SetExpiry", + "Blob_SetHTTPHeaders", + "Blob_SetMetadata", + "Blob_AcquireLease", + "Blob_ReleaseLease", + "Blob_RenewLease", + "Blob_ChangeLease", + "Blob_BreakLease", + "Blob_CreateSnapshot", + "Blob_StartCopyFromUri", + "Blob_CopyFromUri", + "Blob_Query", + "PageBlob_Create", + "PageBlob_UploadPages", + "PageBlob_ClearPages", + "PageBlob_UploadPagesFromUri", + "PageBlob_GetPageRanges", + "PageBlob_GetPageRangesDiff", + "PageBlob_Resize", + "PageBlob_UpdateSequenceNumber", + "PageBlob_StartCopyIncremental", + ]; + for (const url in $["x-ms-paths"]) { + for (const verb in $["x-ms-paths"][url]) { + if (!operations.includes($["x-ms-paths"][url][verb].operationId)) continue; + const operation = $["x-ms-paths"][url][verb]; + + const status_codes = Object.keys(operation.responses).filter(s => s !== "default"); + status_codes.forEach((status_code, i) => { + operation.responses[status_code].headers["Last-Modified"]["x-ms-client-default"] = ""; + operation.responses[status_code].headers["Last-Modified"]["x-nullable"] = true; + operation.responses[status_code].headers["ETag"]["x-ms-client-default"] = ""; + operation.responses[status_code].headers["ETag"]["x-nullable"] = true; + }); + } + } +``` + ### GetBlobServiceProperties ```yaml @@ -745,7 +795,12 @@ directive: delete $.ListBlobsFlatSegmentResponse.required; $.ListBlobsFlatSegmentResponse.properties["NextMarker"]["x-nullable"] = true; + $.BlobName["x-namespace"] = "_detail"; + delete $.BlobName.properties["content"]["xml"]; + $.BlobName["xml"] = {"name": "Name"}; + $.BlobName.properties["content"]["x-ms-xml"] = {"name": "."}; $.BlobItemInternal["x-ms-client-name"] = "BlobItem"; + $.BlobItemInternal["x-namespace"] = "_detail"; $.BlobItemInternal.properties["Deleted"]["x-ms-client-name"] = "IsDeleted"; $.BlobItemInternal.properties["Properties"]["x-ms-client-name"] = "Details"; $.BlobItemInternal.properties["BlobSize"] = $.BlobPropertiesInternal.properties["Content-Length"]; @@ -835,7 +890,7 @@ directive: $.ListBlobsHierarchySegmentResponse.properties["NextMarker"]["x-ms-client-name"] = "ContinuationToken"; $.ListBlobsHierarchySegmentResponse.properties["Blobs"] = $.ListBlobsFlatSegmentResponse.properties["Blobs"]; $.ListBlobsHierarchySegmentResponse.properties["Blobs"]["x-ms-client-name"] = "Items"; - $.ListBlobsHierarchySegmentResponse.properties["BlobPrefixes"] = {"type": "array", "items": {"type": "string", "xml": {"name": "Name"}}, "x-ms-xml": {"wrapped": true, "name": "Blobs/BlobPrefix"}}; + $.ListBlobsHierarchySegmentResponse.properties["BlobPrefixes"] = {"type": "array", "items": {"$ref": "#/definitions/BlobName"}, "x-ms-xml": {"wrapped": true, "name": "Blobs/BlobPrefix"}}; delete $.ListBlobsHierarchySegmentResponse.properties["Marker"]; delete $.ListBlobsHierarchySegmentResponse.properties["MaxResults"]; delete $.ListBlobsHierarchySegmentResponse.properties["Segment"]; @@ -1163,6 +1218,7 @@ directive: $["Content-MD5"]["x-nullable"] = true; $["x-ms-content-crc64"]["x-ms-client-name"] = "TransactionalContentHash"; $["x-ms-content-crc64"]["x-nullable"] = true; + $["x-ms-encryption-scope"]["x-nullable"] = true; ``` ### QueryBlobContent diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp index deb79a8728..9017f6f18f 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp @@ -477,21 +477,21 @@ namespace Azure { namespace Storage { namespace Test { } } - TEST_F(BlobContainerClientTest, DISABLED_EncryptionScope) + TEST_F(BlobContainerClientTest, EncryptionScope) { - auto client = GetBlobContainerTestClient(); - client.Create(); + auto blobContainerClient = GetBlobContainerTestClient(); + blobContainerClient.CreateIfNotExists(); auto const& testEncryptionScope = GetTestEncryptionScope(); { - auto properties = client.GetProperties().Value; + auto properties = blobContainerClient.GetProperties().Value; EXPECT_EQ(properties.DefaultEncryptionScope, AccountEncryptionKey); EXPECT_EQ(properties.PreventEncryptionScopeOverride, false); } { - std::string containerName = LowercaseRandomString(); - std::string blobName = RandomString(); - Blobs::BlobClientOptions options; + std::string containerName = GetContainerValidName() + "1"; + std::string blobName = GetTestName() + "1"; + Blobs::BlobClientOptions options = InitClientOptions(); options.EncryptionScope = testEncryptionScope; auto containerClient = Azure::Storage::Blobs::BlobContainerClient::CreateFromConnectionString( StandardStorageConnectionString(), containerName, options); @@ -526,9 +526,7 @@ namespace Azure { namespace Storage { namespace Test { appendBlobClient.Delete(); EXPECT_TRUE(blobContentInfo.Value.EncryptionScope.HasValue()); EXPECT_EQ(blobContentInfo.Value.EncryptionScope.Value(), testEncryptionScope); - auto appendBlobClientWithoutEncryptionScope - = Azure::Storage::Blobs::AppendBlobClient::CreateFromConnectionString( - StandardStorageConnectionString(), containerName, blobName); + auto appendBlobClientWithoutEncryptionScope = containerClient.GetAppendBlobClient(blobName); blobContentInfo = appendBlobClientWithoutEncryptionScope.Create(); appendBlobClientWithoutEncryptionScope.Delete(); EXPECT_TRUE(blobContentInfo.Value.EncryptionScope.HasValue()); @@ -536,8 +534,8 @@ namespace Azure { namespace Storage { namespace Test { containerClient.Delete(); } { - std::string blobName = RandomString(); - Blobs::BlobClientOptions options; + std::string blobName = GetTestName() + "2"; + Blobs::BlobClientOptions options = InitClientOptions(); options.EncryptionScope = testEncryptionScope; auto appendBlobClient = Azure::Storage::Blobs::AppendBlobClient::CreateFromConnectionString( StandardStorageConnectionString(), m_containerName, blobName, options); @@ -557,8 +555,7 @@ namespace Azure { namespace Storage { namespace Test { bodyStream.Rewind(); auto appendBlobClientWithoutEncryptionScope - = Azure::Storage::Blobs::AppendBlobClient::CreateFromConnectionString( - StandardStorageConnectionString(), m_containerName, blobName); + = blobContainerClient.GetAppendBlobClient(blobName); EXPECT_THROW( appendBlobClientWithoutEncryptionScope.AppendBlock(bodyStream), StorageException); EXPECT_THROW(appendBlobClientWithoutEncryptionScope.CreateSnapshot(), StorageException); @@ -790,15 +787,11 @@ namespace Azure { namespace Storage { namespace Test { TEST_F(BlobContainerClientTest, Tags) { - auto client = GetBlobContainerTestClient(); - client.Create(); + auto containerClient = GetBlobContainerTestClient(); + containerClient.Create(); std::string blobName = "blob" + m_containerName; - auto blobClient = Azure::Storage::Blobs::AppendBlobClient::CreateFromConnectionString( - StandardStorageConnectionString(), - m_containerName, - blobName, - InitClientOptions()); + auto blobClient = containerClient.GetAppendBlobClient(blobName); blobClient.Create(); auto properties = blobClient.GetProperties().Value; @@ -837,14 +830,43 @@ namespace Azure { namespace Storage { namespace Test { auto blobItem = GetBlobItem(blobName, Blobs::Models::ListBlobsIncludeFlags::Tags); EXPECT_EQ(blobItem.Details.Tags, tags); + std::vector blobNames; + blobNames.push_back(blobName); + for (int i = 0; i < 5; ++i) + { + const auto blobName1 = blobName + std::to_string(i); + blobNames.push_back(blobName1); + auto blobClient1 = containerClient.GetAppendBlobClient(blobName1); + blobClient1.Create(); + blobClient1.SetTags(tags); + } + auto blobServiceClient = Azure::Storage::Blobs::BlobServiceClient::CreateFromConnectionString( StandardStorageConnectionString(), InitClientOptions()); std::string whereExpression = c1 + " = '" + v1 + "' AND " + c2 + " >= '" + v2 + "' AND " + c3 + " <= '" + v3 + "'"; - std::vector findResults; + std::vector findResults; + std::vector findResults2; for (int i = 0; i < 30; ++i) { + findResults.clear(); + findResults2.clear(); + Blobs::FindBlobsByTagsOptions findOptions; + findOptions.PageSizeHint = 2; + + for (auto pageResult = containerClient.FindBlobsByTags(whereExpression); pageResult.HasPage(); + pageResult.MoveToNextPage()) + { + EXPECT_FALSE(pageResult.ServiceEndpoint.empty()); + for (auto& item : pageResult.TaggedBlobs) + { + EXPECT_FALSE(item.BlobName.empty()); + EXPECT_EQ(item.BlobContainerName, m_containerName); + EXPECT_FALSE(item.Tags.empty()); + findResults2.emplace_back(item.BlobName); + } + } for (auto pageResult = blobServiceClient.FindBlobsByTags(whereExpression); pageResult.HasPage(); pageResult.MoveToNextPage()) @@ -853,13 +875,13 @@ namespace Azure { namespace Storage { namespace Test { for (auto& item : pageResult.TaggedBlobs) { EXPECT_FALSE(item.BlobName.empty()); - EXPECT_FALSE(item.BlobContainerName.empty()); + EXPECT_EQ(item.BlobContainerName, m_containerName); EXPECT_FALSE(item.Tags.empty()); - findResults.emplace_back(std::move(item)); + findResults.emplace_back(item.BlobName); } } - if (findResults.empty()) + if (findResults.size() != blobNames.size() || findResults2.size() != blobNames.size()) { TestSleep(1s); } @@ -868,9 +890,13 @@ namespace Azure { namespace Storage { namespace Test { break; } } - ASSERT_FALSE(findResults.empty()); - EXPECT_EQ(findResults[0].BlobName, blobName); - EXPECT_EQ(findResults[0].BlobContainerName, m_containerName); + EXPECT_EQ(findResults.size(), blobNames.size()); + EXPECT_EQ(findResults2.size(), blobNames.size()); + std::sort(blobNames.begin(), blobNames.end()); + std::sort(findResults.begin(), findResults.end()); + std::sort(findResults2.begin(), findResults2.end()); + EXPECT_EQ(blobNames, findResults); + EXPECT_EQ(blobNames, findResults2); } TEST_F(BlobContainerClientTest, AccessConditionTags) @@ -1182,7 +1208,7 @@ namespace Azure { namespace Storage { namespace Test { TEST_F(BlobContainerClientTest, SpecialBlobName) { auto client = GetBlobContainerTestClient(); - client.Create(); + client.CreateIfNotExists(); const std::string non_ascii_word = "\xE6\xB5\x8B\xE8\xAF\x95"; const std::string encoded_non_ascii_word = "%E6%B5%8B%E8%AF%95"; @@ -1248,6 +1274,46 @@ namespace Azure { namespace Storage { namespace Test { auto blobItem = GetBlobItem(blobName); EXPECT_EQ(blobItem.Name, blobName); } + { + /* + * UTF-16 0xFFFF and 0xFFFE are not valid in XML, we'll need to encode if blob name contains + * these two characters. + */ + const std::string blobPrefix + = std::string("aaaaa\xEF\xBF\xBF") + "bbb/"; // UTF-8 0xEF, 0xBF, 0xBF is UTF-16 0xFFFF + const std::string blobName = blobPrefix + "ccc"; + auto blobClient = Blobs::BlockBlobClient::CreateFromConnectionString( + StandardStorageConnectionString(), m_containerName, blobName, clientOptions); + EXPECT_NO_THROW(blobClient.UploadFrom(nullptr, 0)); + auto blobUrl = blobClient.GetUrl(); + EXPECT_EQ(blobUrl, client.GetUrl() + "/" + _internal::UrlEncodePath(blobName)); + Blobs::Models::BlobItem blobItem; + Blobs::ListBlobsOptions options; + options.Prefix = "aaaaa"; + for (auto page = client.ListBlobs(options); page.HasPage(); page.MoveToNextPage()) + { + for (auto& blob : page.Blobs) + { + if (blob.Name == blobName) + { + blobItem = std::move(blob); + } + } + } + EXPECT_EQ(blobItem.Name, blobName); + bool found = false; + for (auto page = client.ListBlobsByHierarchy("/"); page.HasPage(); page.MoveToNextPage()) + { + for (auto& p : page.BlobPrefixes) + { + if (p == blobPrefix) + { + found = true; + } + } + } + EXPECT_TRUE(found); + } } TEST_F(BlobContainerClientTest, QuestionMarkBlobName) diff --git a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp index 7244866d91..b9f8d3e6f9 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp @@ -584,6 +584,36 @@ namespace Azure { namespace Storage { namespace Test { options.DeleteSnapshots = Blobs::Models::DeleteSnapshotsOption::IncludeSnapshots; blobClient0.Delete(options); } + + // Encryption scope + const auto encryptionScope = GetTestEncryptionScope(); + { + auto sasBuilderWithEncryptionScope = blobSasBuilder; + sasBuilderWithEncryptionScope.EncryptionScope = encryptionScope; + auto blobClientEncryptionScopeSas = Blobs::AppendBlobClient( + blobUrl + sasBuilderWithEncryptionScope.GenerateSasToken(*keyCredential)); + blobClientEncryptionScopeSas.Create(); + auto blobProperties = blobClientEncryptionScopeSas.GetProperties().Value; + ASSERT_TRUE(blobProperties.EncryptionScope.HasValue()); + EXPECT_EQ(blobProperties.EncryptionScope.Value(), encryptionScope); + + blobClientEncryptionScopeSas = Blobs::AppendBlobClient( + blobUrl + sasBuilderWithEncryptionScope.GenerateSasToken(userDelegationKey, accountName)); + blobClientEncryptionScopeSas.Create(); + blobProperties = blobClientEncryptionScopeSas.GetProperties().Value; + ASSERT_TRUE(blobProperties.EncryptionScope.HasValue()); + EXPECT_EQ(blobProperties.EncryptionScope.Value(), encryptionScope); + } + { + auto sasBuilderWithEncryptionScope = accountSasBuilder; + sasBuilderWithEncryptionScope.EncryptionScope = encryptionScope; + auto blobClientEncryptionScopeSas = Blobs::AppendBlobClient( + blobUrl + sasBuilderWithEncryptionScope.GenerateSasToken(*keyCredential)); + blobClientEncryptionScopeSas.Create(); + auto blobProperties = blobClientEncryptionScopeSas.GetProperties().Value; + ASSERT_TRUE(blobProperties.EncryptionScope.HasValue()); + EXPECT_EQ(blobProperties.EncryptionScope.Value(), encryptionScope); + } } }}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp index 61d24bcde0..5e7b2e28f1 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp +++ b/sdk/storage/azure-storage-blobs/test/ut/block_blob_client_test.cpp @@ -378,6 +378,52 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_FALSE(blobItem.Details.IncrementalCopyDestinationSnapshot.HasValue()); } + TEST_F(BlockBlobClientTest, SyncCopyFromUriEncryptionScope) + { + auto clientOptions = InitClientOptions(); + const auto encryptionScope = GetTestEncryptionScope(); + clientOptions.EncryptionScope = encryptionScope; + const auto containerName = GetContainerValidName(); + const auto blobName = "b"; + auto containerClient = Blobs::BlobContainerClient::CreateFromConnectionString( + StandardStorageConnectionString(), containerName, clientOptions); + containerClient.CreateIfNotExists(); + auto srcBlobClient = containerClient.GetBlockBlobClient(blobName); + uint8_t data; + srcBlobClient.UploadFrom(&data, 1); + + auto properties = srcBlobClient.GetProperties().Value; + ASSERT_TRUE(properties.EncryptionScope.HasValue()); + EXPECT_EQ(properties.EncryptionScope.Value(), encryptionScope); + + { + Sas::BlobSasBuilder builder; + builder.ExpiresOn = std::chrono::system_clock::now() + std::chrono::hours(1); + builder.BlobContainerName = containerName; + builder.BlobName = blobName; + builder.Resource = Sas::BlobSasResource::Blob; + builder.EncryptionScope = encryptionScope; + builder.SetPermissions("r"); + auto keyCredential + = _internal::ParseConnectionString(StandardStorageConnectionString()).KeyCredential; + auto sasToken = builder.GenerateSasToken(*keyCredential); + + auto destBlobClient = GetBlockBlobClient(GetTestName()); + auto response = destBlobClient.CopyFromUri(srcBlobClient.GetUrl() + sasToken); + EXPECT_FALSE(response.Value.EncryptionScope.HasValue()); + properties = destBlobClient.GetProperties().Value; + EXPECT_FALSE(properties.EncryptionScope.HasValue()); + + destBlobClient = containerClient.GetBlockBlobClient(GetTestName()); + response = destBlobClient.CopyFromUri(srcBlobClient.GetUrl() + GetSas()); + ASSERT_TRUE(response.Value.EncryptionScope.HasValue()); + EXPECT_EQ(response.Value.EncryptionScope.Value(), encryptionScope); + properties = destBlobClient.GetProperties().Value; + ASSERT_TRUE(properties.EncryptionScope.HasValue()); + EXPECT_EQ(properties.EncryptionScope.Value(), encryptionScope); + } + } + TEST_F(BlockBlobClientTest, AsyncCopyFromUri) { @@ -455,6 +501,11 @@ namespace Azure { namespace Storage { namespace Test { properties = blobClient->GetProperties().Value; EXPECT_EQ(properties.Metadata, options2.Metadata); EXPECT_EQ(properties.AccessTier.Value(), options2.AccessTier.Value()); + + options2.CopySourceTagsMode = Blobs::Models::BlobCopySourceTagsMode::Copy; + options2.Tags.clear(); + blobClient->CopyFromUri(blockBlobClient.GetUrl() + GetSas(), options2); + EXPECT_TRUE(blobClient->GetTags().Value.empty()); } TEST_F(BlockBlobClientTest, SnapShotVersions) @@ -1856,6 +1907,9 @@ namespace Azure { namespace Storage { namespace Test { auto srcBlobClient = GetBlockBlobClient(testName + "src"); std::vector blobContent(100, 'a'); srcBlobClient.UploadFrom(blobContent.data(), blobContent.size()); + std::map srcTags; + srcTags["srctags"] = "a1212"; + srcBlobClient.SetTags(srcTags); const std::vector blobMd5 = Azure::Core::Cryptography::Md5Hash().Final(blobContent.data(), blobContent.size()); @@ -1894,6 +1948,11 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_EQ(destBlobProperties.Metadata, options.Metadata); EXPECT_EQ(destBlobProperties.AccessTier.Value(), options.AccessTier.Value()); EXPECT_EQ(static_cast(destBlobProperties.TagCount.Value()), options.Tags.size()); + + options.CopySourceTagsMode = Blobs::Models::BlobCopySourceTagsMode::Copy; + options.Tags.clear(); + uploadFromUriResult = destBlobClient.UploadFromUri(srcBlobClient.GetUrl() + GetSas(), options); + EXPECT_EQ(destBlobClient.GetTags().Value, srcTags); } TEST_F(BlockBlobClientTest, SetGetTagsWithLeaseId) diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.EncryptionScope.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.EncryptionScope.json new file mode 100644 index 0000000000..12998d7a68 --- /dev/null +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.EncryptionScope.json @@ -0,0 +1,438 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "22d4c37d-0ebb-4efb-71a4-886a26c89468", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:20 GMT", + "etag": "\"0x8DA569ABC06F99A\"", + "last-modified": "Sat, 25 Jun 2022 11:06:20 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "22d4c37d-0ebb-4efb-71a4-886a26c89468", + "x-ms-request-id": "ebab5f19-201e-008a-0883-888173000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "4335df5c-f537-4a37-47cc-a7138e726cec", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:20 GMT", + "etag": "\"0x8DA569ABC06F99A\"", + "last-modified": "Sat, 25 Jun 2022 11:06:20 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-client-request-id": "4335df5c-f537-4a37-47cc-a7138e726cec", + "x-ms-default-encryption-scope": "$account-encryption-key", + "x-ms-deny-encryption-scope-override": "false", + "x-ms-has-immutability-policy": "false", + "x-ms-has-legal-hold": "false", + "x-ms-immutable-storage-with-versioning-enabled": "false", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "ebab5fa6-201e-008a-7f83-888173000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "17759e44-94b8-4573-7a47-b1a02f72b540", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:21 GMT", + "etag": "\"0x8DA569ABD0DDEED\"", + "last-modified": "Sat, 25 Jun 2022 11:06:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "17759e44-94b8-4573-7a47-b1a02f72b540", + "x-ms-request-id": "6ba8114b-c01e-003b-5a83-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2052d85c-bb20-49d4-50f4-2b4066de48e2", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:21 GMT", + "etag": "\"0x8DA569ABD0DDEED\"", + "last-modified": "Sat, 25 Jun 2022 11:06:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-client-request-id": "2052d85c-bb20-49d4-50f4-2b4066de48e2", + "x-ms-default-encryption-scope": "EncryptionScopeForTest", + "x-ms-deny-encryption-scope-override": "true", + "x-ms-has-immutability-policy": "false", + "x-ms-has-legal-hold": "false", + "x-ms-immutable-storage-with-versioning-enabled": "false", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "6ba8124f-c01e-003b-4b83-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "902b63b1-4e49-4c49-4a56-337bf646679e", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:22 GMT", + "etag": "\"0x8DA569ABD70E40E\"", + "last-modified": "Sat, 25 Jun 2022 11:06:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "902b63b1-4e49-4c49-4a56-337bf646679e", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "6ba812ea-c01e-003b-5483-889f66000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T11:06:22.9591054Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1/EncryptionScope1" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "275875fd-2e48-4d94-67cd-5091dc17b4ec", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "EncryptionScope1EncryptionScope12022-06-25T11:06:22.9591054ZtrueSat, 25 Jun 2022 11:06:22 GMTSat, 25 Jun 2022 11:06:22 GMT0x8DA569ABD70E40E0application/octet-streamAppendBlobunlockedavailabletrueEncryptionScopeForTest", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 11:06:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "vary": "Origin", + "x-ms-client-request-id": "275875fd-2e48-4d94-67cd-5091dc17b4ec", + "x-ms-request-id": "6ba8139f-c01e-003b-7683-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1?comp=list&prefix=EncryptionScope1&restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f7f009d3-5966-4d60-440f-d82a47574a0d", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f7f009d3-5966-4d60-440f-d82a47574a0d", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "6ba8145b-c01e-003b-2983-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1/EncryptionScope1" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "ccaa96f1-f381-43b6-5325-e5bd7484e6e1", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:23 GMT", + "etag": "\"0x8DA569ABE0D0D12\"", + "last-modified": "Sat, 25 Jun 2022 11:06:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ccaa96f1-f381-43b6-5325-e5bd7484e6e1", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "6ba8151c-c01e-003b-5a83-889f66000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T11:06:23.9825170Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1/EncryptionScope1" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "cfc82c9a-1e0e-43d7-7298-e6944de984e9", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "cfc82c9a-1e0e-43d7-7298-e6944de984e9", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "6ba815bd-c01e-003b-6e83-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1/EncryptionScope1" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "c50e76ee-c87e-4628-6981-5e8fbbbcca78", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c50e76ee-c87e-4628-6981-5e8fbbbcca78", + "x-ms-request-id": "6ba8165b-c01e-003b-7c83-889f66000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope1?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "92aa4595-64a3-44a4-702a-7919621cb2e7", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:25 GMT", + "etag": "\"0x8DA569ABF593256\"", + "last-modified": "Sat, 25 Jun 2022 11:06:26 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "92aa4595-64a3-44a4-702a-7919621cb2e7", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "6de14a56-d01e-008e-6a83-880c74000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T11:06:26.1592662Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "ed1fdcbf-8c40-4e43-6271-d49280d72107", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:26 GMT", + "etag": "\"0x8DA569ABF8BD3A3\"", + "last-modified": "Sat, 25 Jun 2022 11:06:26 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ed1fdcbf-8c40-4e43-6271-d49280d72107", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "6de14b42-d01e-008e-3983-880c74000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T11:06:26.4930752Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2?comp=metadata" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "24857204-e9a7-4eb4-6d56-1287464158d4", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Sat, 25 Jun 2022 11:06:26 GMT", + "etag": "\"0x8DA569ABF8BD3A3\"", + "last-modified": "Sat, 25 Jun 2022 11:06:26 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-blob-committed-block-count": "0", + "x-ms-blob-type": "AppendBlob", + "x-ms-client-request-id": "24857204-e9a7-4eb4-6d56-1287464158d4", + "x-ms-creation-time": "Sat, 25 Jun 2022 11:06:26 GMT", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-is-current-version": "true", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "6de14bee-d01e-008e-4f83-880c74000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T11:06:26.4930752Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d8463f10-a4aa-4daf-71c3-cc75dcbd31a4", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:26 GMT", + "etag": "\"0x8DA569ABFECAA0E\"", + "last-modified": "Sat, 25 Jun 2022 11:06:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-blob-append-offset": "0", + "x-ms-blob-committed-block-count": "1", + "x-ms-client-request-id": "d8463f10-a4aa-4daf-71c3-cc75dcbd31a4", + "x-ms-content-crc64": "KIfs70dQ2tU=", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "6de14cb2-d01e-008e-0383-880c74000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2?comp=appendblock" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "e941f6fc-c95c-415a-60a0-a02fb7009a1b", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "BlobUsesCustomerSpecifiedEncryptionThe blob is encrypted with customer specified encryption, but it was not provided in the request.\nRequestId:6de14d6d-d01e-008e-2083-880c74000000\nTime:2022-06-25T11:06:27.4443202Z", + "REASON_PHRASE": "The blob is encrypted with customer specified encryption, but it was not provided in the request.", + "STATUS_CODE": "409", + "content-length": "301", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 11:06:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e941f6fc-c95c-415a-60a0-a02fb7009a1b", + "x-ms-error-code": "BlobUsesCustomerSpecifiedEncryption", + "x-ms-request-id": "6de14d6d-d01e-008e-2083-880c74000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2?comp=appendblock" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2c582440-9af5-49d7-402d-3dae79759740", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "BlobUsesCustomerSpecifiedEncryptionThe blob is encrypted with customer specified encryption, but it was not provided in the request.\nRequestId:6de14e3e-d01e-008e-5683-880c74000000\nTime:2022-06-25T11:06:27.7611392Z", + "REASON_PHRASE": "The blob is encrypted with customer specified encryption, but it was not provided in the request.", + "STATUS_CODE": "409", + "content-length": "301", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 11:06:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "2c582440-9af5-49d7-402d-3dae79759740", + "x-ms-error-code": "BlobUsesCustomerSpecifiedEncryption", + "x-ms-request-id": "6de14e3e-d01e-008e-5683-880c74000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2?comp=snapshot" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "440e942f-fba7-4c84-499d-db434b43d1af", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:27 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "440e942f-fba7-4c84-499d-db434b43d1af", + "x-ms-delete-type-permanent": "false", + "x-ms-request-id": "6de14ef7-d01e-008e-7683-880c74000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope/EncryptionScope2" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "25abaec8-8a44-45dc-4839-620961349064", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 11:06:28 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "25abaec8-8a44-45dc-4839-620961349064", + "x-ms-request-id": "6de14fdd-d01e-008e-3083-880c74000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestencryptionscope?restype=container" + } + ] +} diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.SpecialBlobName.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.SpecialBlobName.json index c8094abbf3..2dea9f397f 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.SpecialBlobName.json +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.SpecialBlobName.json @@ -2,31 +2,31 @@ "networkCallRecords": [ { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "caddbf7c-e6b7-46ec-7ac1-39ae992cab98", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "3fc8632c-7297-4a15-5492-7b9317e80e4f", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { - "BODY": "", - "REASON_PHRASE": "Created", - "STATUS_CODE": "201", - "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE35200EE\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:622f35fc-801e-0005-3749-880819000000\nTime:2022-06-25T04:08:00.1551929Z", + "REASON_PHRASE": "The specified container already exists.", + "STATUS_CODE": "409", + "content-length": "230", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 04:07:59 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "caddbf7c-e6b7-46ec-7ac1-39ae992cab98", - "x-ms-request-id": "618559cc-a01e-0077-5ac8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "x-ms-client-request-id": "3fc8632c-7297-4a15-5492-7b9317e80e4f", + "x-ms-error-code": "ContainerAlreadyExists", + "x-ms-request-id": "622f35fc-801e-0005-3749-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "82e15a63-aa5e-4715-6bde-77b844a46d09", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "ec9c64ee-f1c3-4300-7172-e3e24d798f28", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -34,44 +34,45 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE354586A\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:00 GMT", + "etag": "\"0x8DA56604B35A589\"", + "last-modified": "Sat, 25 Jun 2022 04:08:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "82e15a63-aa5e-4715-6bde-77b844a46d09", - "x-ms-request-id": "618559e3-a01e-0077-6ec8-f2bf6a000000", + "x-ms-client-request-id": "ec9c64ee-f1c3-4300-7172-e3e24d798f28", + "x-ms-request-id": "622f3652-801e-0005-7d49-880819000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.3831530Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:00.5002633Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "12033ef8-005f-4ad3-6f1a-a439dab4aa71", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "e38f0600-eb9a-448d-6a5e-2191b28ac925", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobnamea b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname2021-12-16T22:03:27.3831530ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE354586A0application/octet-streamAppendBlobunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobnamea b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname2022-06-25T04:08:00.5002633ZtrueSat, 25 Jun 2022 04:08:00 GMTSat, 25 Jun 2022 04:08:00 GMT0x8DA56604B35A5890application/octet-streamAppendBlobunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "12033ef8-005f-4ad3-6f1a-a439dab4aa71", - "x-ms-request-id": "618559fc-a01e-0077-05c8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "e38f0600-eb9a-448d-6a5e-2191b28ac925", + "x-ms-request-id": "622f36ae-801e-0005-4b49-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "da2b7858-f6f5-4ef5-5a59-f7e20263c86e", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "8e43d1b6-423b-45e6-573b-e5934d128d8e", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -79,44 +80,45 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE3584F7E\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:00 GMT", + "etag": "\"0x8DA56604B95B8F3\"", + "last-modified": "Sat, 25 Jun 2022 04:08:01 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "da2b7858-f6f5-4ef5-5a59-f7e20263c86e", - "x-ms-request-id": "61855a04-a01e-0077-0dc8-f2bf6a000000", + "x-ms-client-request-id": "8e43d1b6-423b-45e6-573b-e5934d128d8e", + "x-ms-request-id": "622f3721-801e-0005-2a49-880819000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.4091390Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:01.1299059Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname1" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "c3e7786f-0319-4b56-6fae-57b9dec17d2f", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "cb10401c-3444-47cd-4541-353fa51b9262", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname1a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname12021-12-16T22:03:27.4091390ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE3584F7E1024application/octet-stream0PageBlobunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname1a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname12022-06-25T04:08:01.1299059ZtrueSat, 25 Jun 2022 04:08:01 GMTSat, 25 Jun 2022 04:08:01 GMT0x8DA56604B95B8F31024application/octet-stream0PageBlobunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:01 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "c3e7786f-0319-4b56-6fae-57b9dec17d2f", - "x-ms-request-id": "61855a12-a01e-0077-1bc8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "cb10401c-3444-47cd-4541-353fa51b9262", + "x-ms-request-id": "622f3787-801e-0005-7c49-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname1&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "ffab671a-a5f1-4b03-78ce-51a6b00cf42f", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "a432efe8-3979-40fa-68fe-d3b2c72735e5", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -125,45 +127,46 @@ "STATUS_CODE": "201", "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE35BF86A\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:01 GMT", + "etag": "\"0x8DA56604BF94E4E\"", + "last-modified": "Sat, 25 Jun 2022 04:08:01 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ffab671a-a5f1-4b03-78ce-51a6b00cf42f", + "x-ms-client-request-id": "a432efe8-3979-40fa-68fe-d3b2c72735e5", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "61855a17-a01e-0077-20c8-f2bf6a000000", + "x-ms-request-id": "622f37fc-801e-0005-5f49-880819000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.4341237Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:01.7825358Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname2" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "ec3e273d-c029-4d6c-5104-4145943eb035", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "a229df2f-a3bb-432a-7152-9955416851ea", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname2a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname22021-12-16T22:03:27.4341237ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE35BF86A0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname2a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname22022-06-25T04:08:01.7825358ZtrueSat, 25 Jun 2022 04:08:01 GMTSat, 25 Jun 2022 04:08:01 GMT0x8DA56604BF94E4E0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Sat, 25 Jun 2022 04:08:01 GMTBlockBlobHottrueunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:01 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "ec3e273d-c029-4d6c-5104-4145943eb035", - "x-ms-request-id": "61855a2b-a01e-0077-32c8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "a229df2f-a3bb-432a-7152-9955416851ea", + "x-ms-request-id": "622f385c-801e-0005-3349-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname2&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "a407d655-98e4-4007-7f20-ee6287439ea6", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "3b355deb-3bc9-4718-427b-8621b7726914", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -171,44 +174,45 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE35F7A58\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:02 GMT", + "etag": "\"0x8DA56604D1DA6A1\"", + "last-modified": "Sat, 25 Jun 2022 04:08:03 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a407d655-98e4-4007-7f20-ee6287439ea6", - "x-ms-request-id": "61855a38-a01e-0077-3fc8-f2bf6a000000", + "x-ms-client-request-id": "3b355deb-3bc9-4718-427b-8621b7726914", + "x-ms-request-id": "ffcf3275-601e-006f-2e49-88d031000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.4571105Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:03.6984481Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname3" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "3520d768-cb71-40ca-4717-f54b06b09dd5", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f26c20bf-9c58-408a-52da-7152f4265756", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname3a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname32021-12-16T22:03:27.4571105ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE35F7A580application/octet-streamAppendBlobunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname3a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname32022-06-25T04:08:03.6984481ZtrueSat, 25 Jun 2022 04:08:03 GMTSat, 25 Jun 2022 04:08:03 GMT0x8DA56604D1DA6A10application/octet-streamAppendBlobunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:03 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "3520d768-cb71-40ca-4717-f54b06b09dd5", - "x-ms-request-id": "61855a86-a01e-0077-06c8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "f26c20bf-9c58-408a-52da-7152f4265756", + "x-ms-request-id": "ffcf32d9-601e-006f-7d49-88d031000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname3&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "7a018901-b9f5-475d-7ad3-528304f5e56a", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "74ff023a-6e85-4df5-60b2-956d91d626ad", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -216,44 +220,45 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE379672B\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:03 GMT", + "etag": "\"0x8DA56604D7FDCA1\"", + "last-modified": "Sat, 25 Jun 2022 04:08:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "7a018901-b9f5-475d-7ad3-528304f5e56a", - "x-ms-request-id": "61855aa8-a01e-0077-22c8-f2bf6a000000", + "x-ms-client-request-id": "74ff023a-6e85-4df5-60b2-956d91d626ad", + "x-ms-request-id": "ffcf3364-601e-006f-7249-88d031000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.6260139Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:04.3420833Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname4" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "cad09f8a-4389-4cac-6f56-5c2da587c46a", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "c42613c6-20bc-4564-4252-95e69547963d", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname4a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname42021-12-16T22:03:27.6260139ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE379672B1024application/octet-stream0PageBlobunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname4a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname42022-06-25T04:08:04.3420833ZtrueSat, 25 Jun 2022 04:08:04 GMTSat, 25 Jun 2022 04:08:04 GMT0x8DA56604D7FDCA11024application/octet-stream0PageBlobunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:03 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "cad09f8a-4389-4cac-6f56-5c2da587c46a", - "x-ms-request-id": "61855acc-a01e-0077-41c8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "c42613c6-20bc-4564-4252-95e69547963d", + "x-ms-request-id": "ffcf33b9-601e-006f-3a49-88d031000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname4&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "2e779d6b-1223-43cf-4261-5d744c50562c", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "7e60c45f-cee6-4342-6aec-024b9c7ab84f", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -262,45 +267,116 @@ "STATUS_CODE": "201", "content-length": "0", "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", - "etag": "\"0x8D9C0DFE3821876\"", - "last-modified": "Thu, 16 Dec 2021 22:03:27 GMT", + "date": "Sat, 25 Jun 2022 04:08:04 GMT", + "etag": "\"0x8DA56604DE4AA48\"", + "last-modified": "Sat, 25 Jun 2022 04:08:05 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "2e779d6b-1223-43cf-4261-5d744c50562c", + "x-ms-client-request-id": "7e60c45f-cee6-4342-6aec-024b9c7ab84f", "x-ms-content-crc64": "AAAAAAAAAAA=", - "x-ms-request-id": "61855af5-a01e-0077-66c8-f2bf6a000000", + "x-ms-request-id": "ffcf340c-601e-006f-7949-88d031000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:03:27.6829814Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:05.0027080Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/a%20b%20c%20/%20!@%23$%25%5E&*(%3F/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname5" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "4e17334c-3d24-4fe8-5b5d-9304273ad43b", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "31be965d-048e-4b62-4102-13931bf0b89f", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname5a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname52021-12-16T22:03:27.6829814ZtrueThu, 16 Dec 2021 22:03:27 GMTThu, 16 Dec 2021 22:03:27 GMT0x8D9C0DFE38218760application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==BlockBlobHottrueunlockedavailabletrue", + "BODY": "a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname5a b c / !@#$%^&*(?/<>,.;:'\"[]{}|`~) def测试blobcontainerclienttestspecialblobname52022-06-25T04:08:05.0027080ZtrueSat, 25 Jun 2022 04:08:05 GMTSat, 25 Jun 2022 04:08:05 GMT0x8DA56604DE4AA480application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Sat, 25 Jun 2022 04:08:05 GMTBlockBlobHottrueunlockedavailabletrue", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "4e17334c-3d24-4fe8-5b5d-9304273ad43b", - "x-ms-request-id": "61855b06-a01e-0077-77c8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "31be965d-048e-4b62-4102-13931bf0b89f", + "x-ms-request-id": "ffcf34a1-601e-006f-7649-88d031000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=a%20b%20c%20/%20!@%23$%25%5E%26*(?/%3C%3E,.;:'%22%5B%5D%7B%7D%7C%60~)%20def%E6%B5%8B%E8%AF%95blobcontainerclienttestspecialblobname5&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "f7c4cd4e-4cce-4b7a-5c9c-942607c5545a", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "a11ef2ee-8ed2-45b7-68ff-8fa78fdbc6ee", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "content-md5": "1B2M2Y8AsgTpgAmY7PhCfg==", + "date": "Sat, 25 Jun 2022 04:08:05 GMT", + "etag": "\"0x8DA56604EA67E90\"", + "last-modified": "Sat, 25 Jun 2022 04:08:06 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "a11ef2ee-8ed2-45b7-68ff-8fa78fdbc6ee", + "x-ms-content-crc64": "AAAAAAAAAAA=", + "x-ms-request-id": "ffcf34eb-601e-006f-3149-88d031000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T04:08:06.2739872Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname/aaaaa%EF%BF%BFbbb/ccc" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "bba38f86-d5be-4443-65ff-cc4f802207ef", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "aaaaaaaaaabbb/c2022-06-25T04:07:05.9242223ZtrueSat, 25 Jun 2022 04:07:05 GMTSat, 25 Jun 2022 04:07:05 GMT0x8DA56602AAE00EF0application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Sat, 25 Jun 2022 04:07:05 GMTBlockBlobHottrueunlockedavailabletrueaaaaa%EF%BF%BFbbb%2Fccc2022-06-25T04:08:06.2739872ZtrueSat, 25 Jun 2022 04:08:06 GMTSat, 25 Jun 2022 04:08:06 GMT0x8DA56604EA67E900application/octet-stream1B2M2Y8AsgTpgAmY7PhCfg==Sat, 25 Jun 2022 04:08:06 GMTBlockBlobHottrueunlockedavailabletrue", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 04:08:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "vary": "Origin", + "x-ms-client-request-id": "bba38f86-d5be-4443-65ff-cc4f802207ef", + "x-ms-request-id": "ffcf35ef-601e-006f-0349-88d031000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&prefix=aaaaa&restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "699e782f-6444-40a7-5c64-9f27b2a96d17", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "/a b c /aaaaabbb/aaaaa%EF%BF%BFbbb%2F", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 04:08:06 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "vary": "Origin", + "x-ms-client-request-id": "699e782f-6444-40a7-5c64-9f27b2a96d17", + "x-ms-request-id": "ffcf364d-601e-006f-5349-88d031000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?comp=list&delimiter=/&restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1d2979d4-69cd-4e0f-76ab-5ecdda375617", + "x-ms-version": "2021-04-10" }, "Method": "DELETE", "Response": { @@ -308,11 +384,11 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:03:26 GMT", + "date": "Sat, 25 Jun 2022 04:08:06 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f7c4cd4e-4cce-4b7a-5c9c-942607c5545a", - "x-ms-request-id": "61855b19-a01e-0077-0ac8-f2bf6a000000", - "x-ms-version": "2020-02-10" + "x-ms-client-request-id": "1d2979d4-69cd-4e0f-76ab-5ecdda375617", + "x-ms-request-id": "ffcf36ba-601e-006f-3249-88d031000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttestspecialblobname?restype=container" } diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.Tags.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.Tags.json index 61bdf83635..654df9c244 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.Tags.json +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobContainerClientTest.Tags.json @@ -2,9 +2,9 @@ "networkCallRecords": [ { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "3bcb2309-aaf3-4d0b-6f9a-440a118f1b6b", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "64a2b3a3-6966-4163-51ea-fb2a95fa1331", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -12,21 +12,21 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Sun, 20 Feb 2022 05:27:30 GMT", - "etag": "\"0x8D9F431B080C267\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:11 GMT", + "etag": "\"0x8DA566AEFDBD255\"", + "last-modified": "Sat, 25 Jun 2022 05:24:11 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3bcb2309-aaf3-4d0b-6f9a-440a118f1b6b", - "x-ms-request-id": "de3aee85-001e-0039-7a1a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "64a2b3a3-6966-4163-51ea-fb2a95fa1331", + "x-ms-request-id": "824ed3d1-f01e-0052-1553-88a62a000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "d27606df-4899-49bc-58ea-faea349cceb6", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "4beb1b5d-fb88-43be-779f-f761380d4e99", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -34,23 +34,23 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Sun, 20 Feb 2022 05:27:30 GMT", - "etag": "\"0x8D9F431B0A856C4\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:11 GMT", + "etag": "\"0x8DA566AF0179384\"", + "last-modified": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "d27606df-4899-49bc-58ea-faea349cceb6", - "x-ms-request-id": "de3aef0c-001e-0039-741a-263749000000", + "x-ms-client-request-id": "4beb1b5d-fb88-43be-779f-f761380d4e99", + "x-ms-request-id": "824ed4a2-f01e-0052-5a53-88a62a000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T05:27:30.4032964Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:12.0955540Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "c972d5e7-b0a8-4826-6ffd-525ea77f984b", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f70ef028-b83b-4553-7fd0-3368ca80f058", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -60,30 +60,30 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Sun, 20 Feb 2022 05:27:30 GMT", - "etag": "\"0x8D9F431B0A856C4\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:12 GMT", + "etag": "\"0x8DA566AF0179384\"", + "last-modified": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", "x-ms-blob-committed-block-count": "0", "x-ms-blob-type": "AppendBlob", - "x-ms-client-request-id": "c972d5e7-b0a8-4826-6ffd-525ea77f984b", - "x-ms-creation-time": "Sun, 20 Feb 2022 05:27:30 GMT", + "x-ms-client-request-id": "f70ef028-b83b-4553-7fd0-3368ca80f058", + "x-ms-creation-time": "Sat, 25 Jun 2022 05:24:12 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "de3aef4e-001e-0039-321a-263749000000", + "x-ms-request-id": "824ed58d-f01e-0052-2453-88a62a000000", "x-ms-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T05:27:30.4032964Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:12.0955540Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "aacd61c4-2e05-42ca-5c7a-0707670bf89d", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "3333e184-195e-405b-4fb6-3bed6bb32dcd", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -93,30 +93,30 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Sun, 20 Feb 2022 05:27:30 GMT", - "etag": "\"0x8D9F431B0A856C4\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:12 GMT", + "etag": "\"0x8DA566AF0179384\"", + "last-modified": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", "x-ms-blob-committed-block-count": "0", "x-ms-blob-type": "AppendBlob", - "x-ms-client-request-id": "aacd61c4-2e05-42ca-5c7a-0707670bf89d", - "x-ms-creation-time": "Sun, 20 Feb 2022 05:27:30 GMT", + "x-ms-client-request-id": "3333e184-195e-405b-4fb6-3bed6bb32dcd", + "x-ms-creation-time": "Sat, 25 Jun 2022 05:24:12 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "de3aef96-001e-0039-731a-263749000000", + "x-ms-request-id": "824ed640-f01e-0052-4753-88a62a000000", "x-ms-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T05:27:30.4032964Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:12.0955540Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "73557ccc-c7ff-4c06-729f-d89428b60337", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1d2bf0a4-3508-4f20-78fe-8e728e082112", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -125,40 +125,40 @@ "STATUS_CODE": "200", "content-length": "64", "content-type": "application/xml", - "date": "Sun, 20 Feb 2022 05:27:31 GMT", + "date": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", - "x-ms-client-request-id": "73557ccc-c7ff-4c06-729f-d89428b60337", - "x-ms-request-id": "de3af016-001e-0039-6d1a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "1d2bf0a4-3508-4f20-78fe-8e728e082112", + "x-ms-request-id": "824ed735-f01e-0052-2a53-88a62a000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags?comp=tags" }, { "Headers": { "content-type": "application/xml; charset=UTF-8", - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "26b3ed0e-789a-4191-6ea2-c15a517a97dc", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1c6da193-c721-4cf3-5583-c6e0ecf794a9", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { "BODY": "", "REASON_PHRASE": "No Content", "STATUS_CODE": "204", - "date": "Sun, 20 Feb 2022 05:27:31 GMT", + "date": "Sat, 25 Jun 2022 05:24:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "26b3ed0e-789a-4191-6ea2-c15a517a97dc", - "x-ms-request-id": "de3af091-001e-0039-621a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "1c6da193-c721-4cf3-5583-c6e0ecf794a9", + "x-ms-request-id": "824ed839-f01e-0052-1653-88a62a000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags?comp=tags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "43cdb534-1edc-42c0-6e8f-b7eec3d97864", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "14274b63-a0c3-426b-6247-29412e2ed9b4", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -167,20 +167,20 @@ "STATUS_CODE": "200", "content-length": "354", "content-type": "application/xml", - "date": "Sun, 20 Feb 2022 05:27:31 GMT", + "date": "Sat, 25 Jun 2022 05:24:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", - "x-ms-client-request-id": "43cdb534-1edc-42c0-6e8f-b7eec3d97864", - "x-ms-request-id": "de3af0fc-001e-0039-3d1a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "14274b63-a0c3-426b-6247-29412e2ed9b4", + "x-ms-request-id": "824ed93a-f01e-0052-0653-88a62a000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags?comp=tags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "eb6e23cb-20ef-4a95-63a5-04f64d421ff6", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "3ed2f563-3f19-47b2-70bd-f363a025268f", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -190,31 +190,31 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Sun, 20 Feb 2022 05:27:31 GMT", - "etag": "\"0x8D9F431B0A856C4\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:13 GMT", + "etag": "\"0x8DA566AF0179384\"", + "last-modified": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", "x-ms-blob-committed-block-count": "0", "x-ms-blob-type": "AppendBlob", - "x-ms-client-request-id": "eb6e23cb-20ef-4a95-63a5-04f64d421ff6", - "x-ms-creation-time": "Sun, 20 Feb 2022 05:27:30 GMT", + "x-ms-client-request-id": "3ed2f563-3f19-47b2-70bd-f363a025268f", + "x-ms-creation-time": "Sat, 25 Jun 2022 05:24:12 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "de3af146-001e-0039-7e1a-263749000000", + "x-ms-request-id": "824ed9ca-f01e-0052-0253-88a62a000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "3", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T05:27:30.4032964Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:12.0955540Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "375d08ae-5e8d-4157-586f-6d5001d6bc49", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "92cda55d-c210-4833-685f-653d1636efe9", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -224,75 +224,317 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Sun, 20 Feb 2022 05:27:32 GMT", - "etag": "\"0x8D9F431B0A856C4\"", - "last-modified": "Sun, 20 Feb 2022 05:27:30 GMT", + "date": "Sat, 25 Jun 2022 05:24:14 GMT", + "etag": "\"0x8DA566AF0179384\"", + "last-modified": "Sat, 25 Jun 2022 05:24:12 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", "x-ms-blob-committed-block-count": "0", "x-ms-blob-type": "AppendBlob", - "x-ms-client-request-id": "375d08ae-5e8d-4157-586f-6d5001d6bc49", - "x-ms-creation-time": "Sun, 20 Feb 2022 05:27:30 GMT", + "x-ms-client-request-id": "92cda55d-c210-4833-685f-653d1636efe9", + "x-ms-creation-time": "Sat, 25 Jun 2022 05:24:12 GMT", "x-ms-is-current-version": "true", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "de3af1bd-001e-0039-611a-263749000000", + "x-ms-request-id": "824eda61-f01e-0052-0353-88a62a000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "3", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T05:27:30.4032964Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:12.0955540Z" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "ba59ce19-b611-4474-524f-5234298a790c", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "6b2698d9-5396-461c-5cc8-ec12ad08c24d", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "blobblobcontainerclienttesttagsblobblobcontainerclienttesttags2022-02-20T05:27:30.4032964ZtrueSun, 20 Feb 2022 05:27:30 GMTSun, 20 Feb 2022 05:27:30 GMT0x8D9F431B0A856C40application/octet-streamAppendBlobunlockedavailabletrue3kblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6", + "BODY": "blobblobcontainerclienttesttagsblobblobcontainerclienttesttags2022-06-25T05:24:12.0955540ZtrueSat, 25 Jun 2022 05:24:12 GMTSat, 25 Jun 2022 05:24:12 GMT0x8DA566AF01793840application/octet-streamAppendBlobunlockedavailabletrue3kblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Sun, 20 Feb 2022 05:27:32 GMT", + "date": "Sat, 25 Jun 2022 05:24:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", "vary": "Origin", - "x-ms-client-request-id": "ba59ce19-b611-4474-524f-5234298a790c", - "x-ms-request-id": "de3af230-001e-0039-4a1a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "6b2698d9-5396-461c-5cc8-ec12ad08c24d", + "x-ms-request-id": "824edb38-f01e-0052-4953-88a62a000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags?comp=list&include=tags&prefix=blobblobcontainerclienttesttags&restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "92b49baf-2160-4324-41f0-389224fe6732", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "138b2a47-0144-4779-7fdd-72c2b9a12578", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 05:24:14 GMT", + "etag": "\"0x8DA566AF1EC3597\"", + "last-modified": "Sat, 25 Jun 2022 05:24:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "138b2a47-0144-4779-7fdd-72c2b9a12578", + "x-ms-request-id": "824edbf3-f01e-0052-7b53-88a62a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:15.1657879Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags0" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "141c5f97-9d6c-4908-6ab4-f41a61764095", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 05:24:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "141c5f97-9d6c-4908-6ab4-f41a61764095", + "x-ms-request-id": "824edc5c-f01e-0052-5253-88a62a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags0?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "6d425483-862e-43d2-736a-401341706ffe", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 05:24:15 GMT", + "etag": "\"0x8DA566AF268582F\"", + "last-modified": "Sat, 25 Jun 2022 05:24:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6d425483-862e-43d2-736a-401341706ffe", + "x-ms-request-id": "824edd36-f01e-0052-1153-88a62a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:15.9793199Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags1" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d6f7fde7-ac2c-4739-5b27-42c74263f998", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 05:24:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d6f7fde7-ac2c-4739-5b27-42c74263f998", + "x-ms-request-id": "824ede3e-f01e-0052-0653-88a62a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags1?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "795dd0c1-f698-4d35-53de-f8f28ca29e01", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 05:24:16 GMT", + "etag": "\"0x8DA566AF2E1BC18\"", + "last-modified": "Sat, 25 Jun 2022 05:24:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "795dd0c1-f698-4d35-53de-f8f28ca29e01", + "x-ms-request-id": "824edf4e-f01e-0052-7f53-88a62a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:16.7748632Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags2" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "3a022011-3dbd-4491-6454-3825821c6a7c", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 05:24:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3a022011-3dbd-4491-6454-3825821c6a7c", + "x-ms-request-id": "824ee006-f01e-0052-2553-88a62a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags2?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "c2e65d82-e361-4e97-45a8-a58fa2ea3643", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 05:24:17 GMT", + "etag": "\"0x8DA566AF35DB7A4\"", + "last-modified": "Sat, 25 Jun 2022 05:24:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c2e65d82-e361-4e97-45a8-a58fa2ea3643", + "x-ms-request-id": "824ee123-f01e-0052-2c53-88a62a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:17.5873956Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags3" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "ed175c6a-37ec-4150-588e-c997d7fd911f", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 05:24:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ed175c6a-37ec-4150-588e-c997d7fd911f", + "x-ms-request-id": "824ee21c-f01e-0052-1053-88a62a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags3?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "36980153-45ba-499d-73e5-fd73fe308659", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 05:24:18 GMT", + "etag": "\"0x8DA566AF3D87AE1\"", + "last-modified": "Sat, 25 Jun 2022 05:24:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "36980153-45ba-499d-73e5-fd73fe308659", + "x-ms-request-id": "824ee355-f01e-0052-3a53-88a62a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T05:24:18.3919329Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags4" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "5ae1f731-ac3b-4c55-46fa-9ee7460ae898", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 05:24:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5ae1f731-ac3b-4c55-46fa-9ee7460ae898", + "x-ms-request-id": "824ee41d-f01e-0052-7053-88a62a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags/blobblobcontainerclienttesttags4?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "11c82f51-62cd-4fb0-57f3-2a333378b8fb", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "\nkblobcontainerclienttesttags1 = 'blobcontainerclienttesttags2' AND kblobcontainerclienttesttags3 >= 'blobcontainerclienttesttags4' AND kblobcontainerclienttesttags5 <= 'blobcontainerclienttesttags6'blobblobcontainerclienttesttagsblobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags0blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags1blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags2blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags3blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags4blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 05:24:55 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "vary": "Origin", + "x-ms-client-request-id": "11c82f51-62cd-4fb0-57f3-2a333378b8fb", + "x-ms-request-id": "f40e10ad-501e-0029-0b53-88e4b6000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags?comp=blobs&restype=container&where=kblobcontainerclienttesttags1%20%3D%20'blobcontainerclienttesttags2'%20AND%20kblobcontainerclienttesttags3%20%3E%3D%20'blobcontainerclienttesttags4'%20AND%20kblobcontainerclienttesttags5%20%3C%3D%20'blobcontainerclienttesttags6'" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "0c45311a-bcfc-4c43-4c1b-2a034c197115", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "\nkblobcontainerclienttesttags1 = 'blobcontainerclienttesttags2' AND kblobcontainerclienttesttags3 >= 'blobcontainerclienttesttags4' AND kblobcontainerclienttesttags5 <= 'blobcontainerclienttesttags6'blobblobcontainerclienttesttagsblobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6", + "BODY": "\nkblobcontainerclienttesttags1 = 'blobcontainerclienttesttags2' AND kblobcontainerclienttesttags3 >= 'blobcontainerclienttesttags4' AND kblobcontainerclienttesttags5 <= 'blobcontainerclienttesttags6'blobblobcontainerclienttesttagsblobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags0blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags1blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags2blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags3blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6blobblobcontainerclienttesttags4blobcontainerclienttesttagskblobcontainerclienttesttags1blobcontainerclienttesttags2kblobcontainerclienttesttags3blobcontainerclienttesttags4kblobcontainerclienttesttags5blobcontainerclienttesttags6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Sun, 20 Feb 2022 05:27:33 GMT", + "date": "Sat, 25 Jun 2022 05:25:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", "vary": "Origin", - "x-ms-client-request-id": "92b49baf-2160-4324-41f0-389224fe6732", - "x-ms-request-id": "de3af2ac-001e-0039-3a1a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "0c45311a-bcfc-4c43-4c1b-2a034c197115", + "x-ms-request-id": "8c4ecb35-801e-0077-4353-880f56000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net?comp=blobs&where=kblobcontainerclienttesttags1%20%3D%20'blobcontainerclienttesttags2'%20AND%20kblobcontainerclienttesttags3%20%3E%3D%20'blobcontainerclienttesttags4'%20AND%20kblobcontainerclienttesttags5%20%3C%3D%20'blobcontainerclienttesttags6'" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "8c2ebbaa-5369-47c2-4c87-ed254b8b3e93", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "afc5609e-ea85-4d73-7447-52519486a810", + "x-ms-version": "2021-04-10" }, "Method": "DELETE", "Response": { @@ -300,11 +542,11 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Sun, 20 Feb 2022 05:27:33 GMT", + "date": "Sat, 25 Jun 2022 05:25:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8c2ebbaa-5369-47c2-4c87-ed254b8b3e93", - "x-ms-request-id": "de3af3a9-001e-0039-211a-263749000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "afc5609e-ea85-4d73-7447-52519486a810", + "x-ms-request-id": "8c4ed7b9-801e-0077-5d53-880f56000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blobcontainerclienttesttags?restype=container" } diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobServiceClientTest.SetProperties.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobServiceClientTest.SetProperties.json index 429767bcfd..2c1d7291ae 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobServiceClientTest.SetProperties.json +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlobServiceClientTest.SetProperties.json @@ -2,32 +2,32 @@ "networkCallRecords": [ { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.1 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "35419e25-3165-4f93-51f9-5bab0eaec1ae", - "x-ms-version": "2020-10-02" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2a77ceea-064a-429a-6021-4ca52875ace4", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "1.0truetruetruetrue31.0truetruetrue41.0truetruetrue4GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320true7falsetrueindex.html404.html2020-02-10", + "BODY": "1.0truetruetruetrue31.0truetruetrue41.0truetruetrue4GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320falsefalsetrueindex.html404.html2020-02-10", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 16 May 2022 12:49:31 GMT", + "date": "Sat, 25 Jun 2022 09:01:41 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", "vary": "Origin", - "x-ms-client-request-id": "35419e25-3165-4f93-51f9-5bab0eaec1ae", - "x-ms-request-id": "da10e09f-c01e-0082-5723-699b7c000000", - "x-ms-version": "2020-10-02" + "x-ms-client-request-id": "2a77ceea-064a-429a-6021-4ca52875ace4", + "x-ms-request-id": "62a44147-801e-0005-4972-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" }, { "Headers": { "content-type": "application/xml; charset=UTF-8", - "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.1 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "6944decb-5ada-41b4-6365-2f9b90220ebe", - "x-ms-version": "2020-10-02" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "6a95c651-9aa3-492b-5972-8cbb59324f71", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -35,42 +35,42 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Mon, 16 May 2022 12:49:33 GMT", + "date": "Sat, 25 Jun 2022 09:01:42 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6944decb-5ada-41b4-6365-2f9b90220ebe", - "x-ms-request-id": "da10e162-c01e-0082-1423-699b7c000000", - "x-ms-version": "2020-10-02" + "x-ms-client-request-id": "6a95c651-9aa3-492b-5972-8cbb59324f71", + "x-ms-request-id": "62a442ae-801e-0005-0a72-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.1 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "a72f237f-cb76-4e90-52a6-eea437169f93", - "x-ms-version": "2020-10-02" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d278e4e0-815c-49df-67ab-a8de0f97ef49", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "1.0falsefalsefalsetrue31.0truetruetrue41.0truetruetrue4GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320true7falsetrueindex.html404.html2020-10-02", + "BODY": "1.0falsefalsefalsetrue31.0truetruetrue41.0truetruetrue4GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320true7falsetrueindex.html404.html2021-04-10", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 16 May 2022 12:49:43 GMT", + "date": "Sat, 25 Jun 2022 09:01:52 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", "vary": "Origin", - "x-ms-client-request-id": "a72f237f-cb76-4e90-52a6-eea437169f93", - "x-ms-request-id": "da10fdaf-c01e-0082-1623-699b7c000000", - "x-ms-version": "2020-10-02" + "x-ms-client-request-id": "d278e4e0-815c-49df-67ab-a8de0f97ef49", + "x-ms-request-id": "62a46672-801e-0005-3372-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" }, { "Headers": { "content-type": "application/xml; charset=UTF-8", - "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.1 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "ff874718-2fc2-479f-6308-fe94f0c824c9", - "x-ms-version": "2020-10-02" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "b4b5d9aa-af34-4034-50e3-7188883a0fd8", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -78,11 +78,11 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Mon, 16 May 2022 12:49:43 GMT", + "date": "Sat, 25 Jun 2022 09:01:52 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ff874718-2fc2-479f-6308-fe94f0c824c9", - "x-ms-request-id": "da10fe3e-c01e-0082-1b23-699b7c000000", - "x-ms-version": "2020-10-02" + "x-ms-client-request-id": "b4b5d9aa-af34-4034-50e3-7188883a0fd8", + "x-ms-request-id": "62a46785-801e-0005-3272-880819000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" } diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.CopyWithTagsMetadataTier.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.CopyWithTagsMetadataTier.json index d691278c7b..8370fc74a4 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.CopyWithTagsMetadataTier.json +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.CopyWithTagsMetadataTier.json @@ -2,9 +2,9 @@ "networkCallRecords": [ { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "7d24cc71-aa97-4c63-4969-f47fa74c2dec", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "136c790c-0de5-4777-7b0a-c54ea67fb8f4", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -12,21 +12,21 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:04:17 GMT", - "etag": "\"0x8D9C0E001DE1B9E\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:32:57 GMT", + "etag": "\"0x8DA56854EE03EE9\"", + "last-modified": "Sat, 25 Jun 2022 08:32:58 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "7d24cc71-aa97-4c63-4969-f47fa74c2dec", - "x-ms-request-id": "9097b259-401e-0032-29c8-f26a89000000", - "x-ms-version": "2020-02-10" + "x-ms-client-request-id": "136c790c-0de5-4777-7b0a-c54ea67fb8f4", + "x-ms-request-id": "01b563eb-101e-0091-0c6e-88bf70000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "df627bad-9f58-4892-6a70-ab7cff370d68", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1b091b27-82b3-4b5f-5c06-73a542126d17", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -35,24 +35,24 @@ "STATUS_CODE": "201", "content-length": "0", "content-md5": "IFj7U/ZD/NWKjYOgVUI5Kw==", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E0020A0D10\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:02 GMT", + "etag": "\"0x8DA5685518CC746\"", + "last-modified": "Sat, 25 Jun 2022 08:33:02 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "df627bad-9f58-4892-6a70-ab7cff370d68", + "x-ms-client-request-id": "1b091b27-82b3-4b5f-5c06-73a542126d17", "x-ms-content-crc64": "DU01Kv81ewI=", - "x-ms-request-id": "9097b27e-401e-0032-4ac8-f26a89000000", + "x-ms-request-id": "01b5649f-101e-0091-176e-88bf70000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:18.9056272Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:02.5166150Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "ff1b397b-31c5-4ebd-531f-b4a52c16acca", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "7e32eb34-f071-43c5-420f-fd410e21c2f6", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -67,54 +67,56 @@ "content-length": "8388608", "content-md5": "IFj7U/ZD/NWKjYOgVUI5Kw==", "content-type": "application/x-binary", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E0020A0D10\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:02 GMT", + "etag": "\"0x8DA5685518CC746\"", + "last-modified": "Sat, 25 Jun 2022 08:33:02 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", "x-ms-access-tier": "Hot", - "x-ms-access-tier-change-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-access-tier-change-time": "Sat, 25 Jun 2022 08:33:02 GMT", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "ff1b397b-31c5-4ebd-531f-b4a52c16acca", - "x-ms-creation-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-client-request-id": "7e32eb34-f071-43c5-420f-fd410e21c2f6", + "x-ms-creation-time": "Sat, 25 Jun 2022 08:33:02 GMT", "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 08:33:02 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-key1": "V1", "x-ms-meta-key2": "Value2", - "x-ms-request-id": "9097b3ff-401e-0032-37c8-f26a89000000", + "x-ms-request-id": "01b56cdb-101e-0091-556e-88bf70000000", "x-ms-server-encrypted": "true", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:18.9056272Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:02.5166150Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "100ee672-a8fc-4840-6e02-67c02bf2766b", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "4192a549-8f08-4fd4-6e7e-85efbaa92681", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { - "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:9097b415-401e-0032-4dc8-f26a89000000\nTime:2021-12-16T22:04:18.9304631Z", + "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:493db977-701e-0097-656e-888ccf000000\nTime:2022-06-25T08:33:04.6359117Z", "REASON_PHRASE": "The specified container already exists.", "STATUS_CODE": "409", "content-length": "230", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "100ee672-a8fc-4840-6e02-67c02bf2766b", + "x-ms-client-request-id": "4192a549-8f08-4fd4-6e7e-85efbaa92681", "x-ms-error-code": "ContainerAlreadyExists", - "x-ms-request-id": "9097b415-401e-0032-4dc8-f26a89000000", - "x-ms-version": "2020-02-10" + "x-ms-request-id": "493db977-701e-0097-656e-888ccf000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "a4c089ba-c43f-4274-5e31-7ccd54d78790", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "a66a210e-4304-4937-5c0b-477f14dc3058", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -122,24 +124,24 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E002157D15\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:04 GMT", + "etag": "\"0x8DA568553052627\"", + "last-modified": "Sat, 25 Jun 2022 08:33:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a4c089ba-c43f-4274-5e31-7ccd54d78790", - "x-ms-copy-id": "945f5ef8-d16c-4725-94aa-06750c6a2f85", + "x-ms-client-request-id": "a66a210e-4304-4937-5c0b-477f14dc3058", + "x-ms-copy-id": "cbf0feff-0fea-4a42-9301-767704d03f5a", "x-ms-copy-status": "success", - "x-ms-request-id": "f29278bf-701e-0039-47c8-f291e2000000", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:18.9805845Z" + "x-ms-request-id": "493db9dd-701e-0097-426e-888ccf000000", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:04.9831975Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "b45cc05b-bcac-474e-5365-20d361647029", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "4b660780-eecf-463f-648c-1eae7fccba0a", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -154,38 +156,40 @@ "content-length": "8388608", "content-md5": "IFj7U/ZD/NWKjYOgVUI5Kw==", "content-type": "application/x-binary", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E002157D15\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:04 GMT", + "etag": "\"0x8DA568553052627\"", + "last-modified": "Sat, 25 Jun 2022 08:33:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", "x-ms-access-tier": "Cool", - "x-ms-access-tier-change-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-access-tier-change-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "b45cc05b-bcac-474e-5365-20d361647029", - "x-ms-copy-completion-time": "Thu, 16 Dec 2021 22:04:18 GMT", - "x-ms-copy-id": "945f5ef8-d16c-4725-94aa-06750c6a2f85", + "x-ms-client-request-id": "4b660780-eecf-463f-648c-1eae7fccba0a", + "x-ms-copy-completion-time": "Sat, 25 Jun 2022 08:33:04 GMT", + "x-ms-copy-id": "cbf0feff-0fea-4a42-9301-767704d03f5a", "x-ms-copy-progress": "8388608/8388608", - "x-ms-copy-source": "https://forcpprecordings.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier", + "x-ms-copy-source": "https://euap.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier", "x-ms-copy-status": "success", - "x-ms-creation-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-creation-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-key1": "value1", "x-ms-meta-key2": "value2", - "x-ms-request-id": "f29278d3-701e-0039-56c8-f291e2000000", + "x-ms-request-id": "493dba98-701e-0097-676e-888ccf000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "3", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:18.9805845Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:04.9831975Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "f821b509-6055-40e0-4cd2-e4fd3acdcb0e", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "5581ba07-fbca-4af2-6f78-e2b26eb6c951", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -194,19 +198,20 @@ "STATUS_CODE": "200", "content-length": "225", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:05 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f821b509-6055-40e0-4cd2-e4fd3acdcb0e", - "x-ms-request-id": "f29278e3-701e-0039-66c8-f291e2000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "5581ba07-fbca-4af2-6f78-e2b26eb6c951", + "x-ms-request-id": "493dbb49-701e-0097-0c6e-888ccf000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob?comp=tags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "3a44bbde-1e9c-45f2-6798-ed427e14c965", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "e1bf4178-857c-4a43-5ef7-1db5db62b85a", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -221,38 +226,40 @@ "content-length": "8388608", "content-md5": "IFj7U/ZD/NWKjYOgVUI5Kw==", "content-type": "application/x-binary", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E002157D15\"", - "last-modified": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:05 GMT", + "etag": "\"0x8DA568553052627\"", + "last-modified": "Sat, 25 Jun 2022 08:33:04 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", "x-ms-access-tier": "Cool", - "x-ms-access-tier-change-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-access-tier-change-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "3a44bbde-1e9c-45f2-6798-ed427e14c965", - "x-ms-copy-completion-time": "Thu, 16 Dec 2021 22:04:18 GMT", - "x-ms-copy-id": "945f5ef8-d16c-4725-94aa-06750c6a2f85", + "x-ms-client-request-id": "e1bf4178-857c-4a43-5ef7-1db5db62b85a", + "x-ms-copy-completion-time": "Sat, 25 Jun 2022 08:33:04 GMT", + "x-ms-copy-id": "cbf0feff-0fea-4a42-9301-767704d03f5a", "x-ms-copy-progress": "8388608/8388608", - "x-ms-copy-source": "https://forcpprecordings.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier", + "x-ms-copy-source": "https://euap.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier", "x-ms-copy-status": "success", - "x-ms-creation-time": "Thu, 16 Dec 2021 22:04:18 GMT", + "x-ms-creation-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 08:33:04 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-key1": "value1", "x-ms-meta-key2": "value2", - "x-ms-request-id": "f29278f2-701e-0039-72c8-f291e2000000", + "x-ms-request-id": "493dbbb5-701e-0097-6f6e-888ccf000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "3", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:18.9805845Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:04.9831975Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "b3a9fb6f-b2eb-4fc5-7d97-4bfb89fb14d6", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "9f7fcf73-3b47-46c2-70cd-cda588a6e28e", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -260,25 +267,26 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E0022A6A68\"", - "last-modified": "Thu, 16 Dec 2021 22:04:19 GMT", + "date": "Sat, 25 Jun 2022 08:33:06 GMT", + "etag": "\"0x8DA568553CE6111\"", + "last-modified": "Sat, 25 Jun 2022 08:33:06 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b3a9fb6f-b2eb-4fc5-7d97-4bfb89fb14d6", + "x-ms-client-request-id": "9f7fcf73-3b47-46c2-70cd-cda588a6e28e", "x-ms-content-crc64": "DU01Kv81ewI=", - "x-ms-copy-id": "50498d84-8995-4f25-bbc3-cbc33921f867", + "x-ms-copy-id": "5da2d634-99ff-47da-809e-b5d0fc2ec8da", "x-ms-copy-status": "success", - "x-ms-request-id": "f29278f7-701e-0039-76c8-f291e2000000", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:19.2764164Z" + "x-ms-request-id": "493dbc52-701e-0097-746e-888ccf000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:06.5073218Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "be7281fe-7925-4dd4-528e-2dad35695bd0", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d1171672-12be-48f7-788b-eb6c6754394d", + "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { @@ -287,19 +295,20 @@ "STATUS_CODE": "200", "content-length": "225", "content-type": "application/xml", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:06 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "be7281fe-7925-4dd4-528e-2dad35695bd0", - "x-ms-request-id": "f2927977-701e-0039-6dc8-f291e2000000", - "x-ms-version": "2020-02-10" + "vary": "Origin", + "x-ms-client-request-id": "d1171672-12be-48f7-788b-eb6c6754394d", + "x-ms-request-id": "493dbd7b-701e-0097-7f6e-888ccf000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob?comp=tags" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "36cae37f-2538-4752-5030-947db4ad0ef4", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1bbe7c71-9919-41d4-67ea-ac82c70cc776", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -314,38 +323,89 @@ "content-length": "8388608", "content-md5": "IFj7U/ZD/NWKjYOgVUI5Kw==", "content-type": "application/x-binary", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", - "etag": "\"0x8D9C0E0022A6A68\"", - "last-modified": "Thu, 16 Dec 2021 22:04:19 GMT", + "date": "Sat, 25 Jun 2022 08:33:06 GMT", + "etag": "\"0x8DA568553CE6111\"", + "last-modified": "Sat, 25 Jun 2022 08:33:06 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", "x-ms-access-tier": "Cool", - "x-ms-access-tier-change-time": "Thu, 16 Dec 2021 22:04:19 GMT", + "x-ms-access-tier-change-time": "Sat, 25 Jun 2022 08:33:06 GMT", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "36cae37f-2538-4752-5030-947db4ad0ef4", - "x-ms-copy-completion-time": "Thu, 16 Dec 2021 22:04:19 GMT", - "x-ms-copy-id": "50498d84-8995-4f25-bbc3-cbc33921f867", + "x-ms-client-request-id": "1bbe7c71-9919-41d4-67ea-ac82c70cc776", + "x-ms-copy-completion-time": "Sat, 25 Jun 2022 08:33:06 GMT", + "x-ms-copy-id": "5da2d634-99ff-47da-809e-b5d0fc2ec8da", "x-ms-copy-progress": "8388608/8388608", - "x-ms-copy-source": "https://forcpprecordings.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier?se=2021-12-19T22:04:19Z&sp=racwdxlt&spr=https,http&sr=c&sv=2020-02-10", + "x-ms-copy-source": "https://euap.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTier?se=2022-06-28T08:33:06Z&sp=racwdxlti&spr=https,http&sr=c&sv=2021-04-10", "x-ms-copy-status": "success", - "x-ms-creation-time": "Thu, 16 Dec 2021 22:04:19 GMT", + "x-ms-creation-time": "Sat, 25 Jun 2022 08:33:06 GMT", "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 08:33:06 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-key1": "value1", "x-ms-meta-key2": "value2", - "x-ms-request-id": "f292797c-701e-0039-72c8-f291e2000000", + "x-ms-request-id": "493dbe65-701e-0097-5a6e-888ccf000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "3", - "x-ms-version": "2020-02-10", - "x-ms-version-id": "2021-12-16T22:04:19.2764164Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:06.5073218Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.2.1 (Linux 5.4.0-1063-azure x86_64 #66~18.04.1-Ubuntu SMP Thu Oct 21 09:59:28 UTC 2021)", - "x-ms-client-request-id": "4fbcc750-e5ae-45eb-7372-f90dc49649fa", - "x-ms-version": "2020-02-10" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f6550362-64c1-4e2b-7595-a8cf98f57ddf", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 08:33:09 GMT", + "etag": "\"0x8DA56855480CE9F\"", + "last-modified": "Sat, 25 Jun 2022 08:33:07 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f6550362-64c1-4e2b-7595-a8cf98f57ddf", + "x-ms-content-crc64": "DU01Kv81ewI=", + "x-ms-copy-id": "671e0096-5d20-4fb2-8571-45b304b27e77", + "x-ms-copy-status": "success", + "x-ms-request-id": "493dbf60-701e-0097-446e-888ccf000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:33:10.2121924Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2dff27e6-7c8b-4677-5651-0786d6fa3b35", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "\n", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "64", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 08:33:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-client-request-id": "2dff27e6-7c8b-4677-5651-0786d6fa3b35", + "x-ms-request-id": "493dc6d5-701e-0097-116e-888ccf000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier/CopyWithTagsMetadataTierblob?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1b6c5ce6-7954-4300-6355-a33a8eaaa52e", + "x-ms-version": "2021-04-10" }, "Method": "DELETE", "Response": { @@ -353,11 +413,11 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Thu, 16 Dec 2021 22:04:18 GMT", + "date": "Sat, 25 Jun 2022 08:33:10 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "4fbcc750-e5ae-45eb-7372-f90dc49649fa", - "x-ms-request-id": "f2927987-701e-0039-7dc8-f291e2000000", - "x-ms-version": "2020-02-10" + "x-ms-client-request-id": "1b6c5ce6-7954-4300-6355-a33a8eaaa52e", + "x-ms-request-id": "493dc777-701e-0097-286e-888ccf000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestcopywithtagsmetadatatier?restype=container" } diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.SyncCopyFromUriEncryptionScope.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.SyncCopyFromUriEncryptionScope.json new file mode 100644 index 0000000000..1d8d53536b --- /dev/null +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.SyncCopyFromUriEncryptionScope.json @@ -0,0 +1,270 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "18525e7b-72ee-4074-64c6-8567d0f90d58", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 10:42:08 GMT", + "etag": "\"0x8DA56975A9A5D24\"", + "last-modified": "Sat, 25 Jun 2022 10:42:08 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "18525e7b-72ee-4074-64c6-8567d0f90d58", + "x-ms-request-id": "7db12147-701e-005c-3980-888f9a000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d3f3a901-06c0-490a-78e8-ed4fa5255089", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "content-md5": "oulw8XCWHOh5GQ1kmCyU7A==", + "date": "Sat, 25 Jun 2022 10:42:08 GMT", + "etag": "\"0x8DA56975ACF665B\"", + "last-modified": "Sat, 25 Jun 2022 10:42:08 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d3f3a901-06c0-490a-78e8-ed4fa5255089", + "x-ms-content-crc64": "CCucyRQQkvc=", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "7db12165-701e-005c-4d80-888f9a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:08.9938523Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/b" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2c0ed87c-c550-4cba-7603-b99779cf4eb9", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "1", + "content-md5": "oulw8XCWHOh5GQ1kmCyU7A==", + "content-type": "application/octet-stream", + "date": "Sat, 25 Jun 2022 10:42:09 GMT", + "etag": "\"0x8DA56975ACF665B\"", + "last-modified": "Sat, 25 Jun 2022 10:42:08 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "2c0ed87c-c550-4cba-7603-b99779cf4eb9", + "x-ms-creation-time": "Sat, 25 Jun 2022 10:42:08 GMT", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 10:42:08 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "7db1218f-701e-005c-6b80-888f9a000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:08.9938523Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/b" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "eb65ca72-479a-4038-46dc-362eccfb4a3e", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:b094243f-e01e-0061-1980-88f981000000\nTime:2022-06-25T10:42:10.7810686Z", + "REASON_PHRASE": "The specified container already exists.", + "STATUS_CODE": "409", + "content-length": "230", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 10:42:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "eb65ca72-479a-4038-46dc-362eccfb4a3e", + "x-ms-error-code": "ContainerAlreadyExists", + "x-ms-request-id": "b094243f-e01e-0061-1980-88f981000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f4112cb8-949f-4bb4-5ed6-b8263c6df8ae", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 10:42:11 GMT", + "etag": "\"0x8DA56975C80B0CF\"", + "last-modified": "Sat, 25 Jun 2022 10:42:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f4112cb8-949f-4bb4-5ed6-b8263c6df8ae", + "x-ms-content-crc64": "CCucyRQQkvc=", + "x-ms-copy-id": "dd2ee348-bd30-4036-b9b5-686db1ea6db6", + "x-ms-copy-status": "success", + "x-ms-request-id": "b0942488-e01e-0061-5280-88f981000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:12.0081191Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/SyncCopyFromUriEncryptionScope" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "2a9b78b4-c94d-4699-49bb-8ee631dfef0f", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "1", + "content-md5": "oulw8XCWHOh5GQ1kmCyU7A==", + "content-type": "application/octet-stream", + "date": "Sat, 25 Jun 2022 10:42:11 GMT", + "etag": "\"0x8DA56975C80B0CF\"", + "last-modified": "Sat, 25 Jun 2022 10:42:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "2a9b78b4-c94d-4699-49bb-8ee631dfef0f", + "x-ms-copy-completion-time": "Sat, 25 Jun 2022 10:42:11 GMT", + "x-ms-copy-id": "dd2ee348-bd30-4036-b9b5-686db1ea6db6", + "x-ms-copy-progress": "1/1", + "x-ms-copy-source": "https://euap.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/b?se=2022-06-25T11:42:09Z&ses=EncryptionScopeForTest&sp=r&spr=https&sr=b&sv=2021-04-10", + "x-ms-copy-status": "success", + "x-ms-creation-time": "Sat, 25 Jun 2022 10:42:11 GMT", + "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 10:42:11 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "b09425d0-e01e-0061-6d80-88f981000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:12.0081191Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/SyncCopyFromUriEncryptionScope" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "6e498011-4bc4-45e2-6ca4-a72e6c9861ee", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 10:42:11 GMT", + "etag": "\"0x8DA56975CFDE4D3\"", + "last-modified": "Sat, 25 Jun 2022 10:42:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6e498011-4bc4-45e2-6ca4-a72e6c9861ee", + "x-ms-content-crc64": "CCucyRQQkvc=", + "x-ms-copy-id": "646f3479-cf89-4287-a096-ecaeec84d1e7", + "x-ms-copy-status": "success", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-request-id": "b094262d-e01e-0061-4080-88f981000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:12.6667408Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/SyncCopyFromUriEncryptionScope" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "57dc3581-50e7-4f6f-42ca-349d13affe16", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "1", + "content-md5": "oulw8XCWHOh5GQ1kmCyU7A==", + "content-type": "application/octet-stream", + "date": "Sat, 25 Jun 2022 10:42:12 GMT", + "etag": "\"0x8DA56975CFDE4D3\"", + "last-modified": "Sat, 25 Jun 2022 10:42:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "57dc3581-50e7-4f6f-42ca-349d13affe16", + "x-ms-copy-completion-time": "Sat, 25 Jun 2022 10:42:12 GMT", + "x-ms-copy-id": "646f3479-cf89-4287-a096-ecaeec84d1e7", + "x-ms-copy-progress": "1/1", + "x-ms-copy-source": "https://euap.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/b?se=2022-06-28T10:42:12Z&sp=racwdxlti&spr=https,http&sr=c&sv=2021-04-10", + "x-ms-copy-status": "success", + "x-ms-creation-time": "Sat, 25 Jun 2022 10:42:12 GMT", + "x-ms-encryption-scope": "EncryptionScopeForTest", + "x-ms-is-current-version": "true", + "x-ms-last-access-time": "Sat, 25 Jun 2022 10:42:12 GMT", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "b0942676-e01e-0061-7e80-88f981000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T10:42:12.6667408Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope/SyncCopyFromUriEncryptionScope" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d0603541-cf85-4f58-64ca-f032c5755aa6", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Sat, 25 Jun 2022 10:42:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d0603541-cf85-4f58-64ca-f032c5755aa6", + "x-ms-request-id": "b09426b4-e01e-0061-3280-88f981000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestsynccopyfromuriencryptionscope?restype=container" + } + ] +} diff --git a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.UploadFromUri.json b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.UploadFromUri.json index 1198ae4050..168cd90e47 100644 --- a/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.UploadFromUri.json +++ b/sdk/storage/azure-storage-blobs/test/ut/recordings/BlockBlobClientTest.UploadFromUri.json @@ -2,9 +2,9 @@ "networkCallRecords": [ { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "84fcb7ca-fda3-4111-6c4d-1b5fd28bfc8a", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "67b0d7d2-83bf-4544-52c5-a7e561d6cc68", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -12,21 +12,21 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Sun, 20 Feb 2022 07:09:23 GMT", - "etag": "\"0x8D9F43FEC8C86B7\"", - "last-modified": "Sun, 20 Feb 2022 07:09:23 GMT", + "date": "Sat, 25 Jun 2022 08:35:55 GMT", + "etag": "\"0x8DA5685B9381135\"", + "last-modified": "Sat, 25 Jun 2022 08:35:56 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "84fcb7ca-fda3-4111-6c4d-1b5fd28bfc8a", - "x-ms-request-id": "29d5e0bd-f01e-0042-4228-266342000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "67b0d7d2-83bf-4544-52c5-a7e561d6cc68", + "x-ms-request-id": "d8f62ac8-801e-002a-096e-8805d2000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "834a37a6-a281-43c0-5b89-f17f09504bc9", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "18f63ab3-f9e9-4970-42b1-4eb151f031f4", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -35,46 +35,66 @@ "STATUS_CODE": "201", "content-length": "0", "content-md5": "NqksyUqeD6IfYl+L+wB63w==", - "date": "Sun, 20 Feb 2022 07:09:23 GMT", - "etag": "\"0x8D9F43FECB1518C\"", - "last-modified": "Sun, 20 Feb 2022 07:09:24 GMT", + "date": "Sat, 25 Jun 2022 08:35:55 GMT", + "etag": "\"0x8DA5685B96E3A14\"", + "last-modified": "Sat, 25 Jun 2022 08:35:56 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "834a37a6-a281-43c0-5b89-f17f09504bc9", + "x-ms-client-request-id": "18f63ab3-f9e9-4970-42b1-4eb151f031f4", "x-ms-content-crc64": "eeIkJntVfP0=", - "x-ms-request-id": "29d5e126-f01e-0042-2028-266342000000", + "x-ms-request-id": "d8f62b2d-801e-002a-5d6e-8805d2000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T07:09:24.0796556Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:35:56.7994388Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUrisrc" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "39306e7d-ff5a-4915-7056-e9406f87f5f7", - "x-ms-version": "2020-08-04" + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "cb8fd8a7-1c9e-4f6b-41a9-a6f79e80ec37", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { - "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:29d5e18f-f01e-0042-7c28-266342000000\nTime:2022-02-20T07:09:24.3192637Z", + "BODY": "", + "REASON_PHRASE": "No Content", + "STATUS_CODE": "204", + "date": "Sat, 25 Jun 2022 08:35:56 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "cb8fd8a7-1c9e-4f6b-41a9-a6f79e80ec37", + "x-ms-request-id": "d8f62b7a-801e-002a-216e-8805d2000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUrisrc?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "93c2cbea-83c3-43dd-4ed0-15e39e983666", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "ContainerAlreadyExistsThe specified container already exists.\nRequestId:0abe50d6-801e-0067-086e-88ca3e000000\nTime:2022-06-25T08:35:58.5742177Z", "REASON_PHRASE": "The specified container already exists.", "STATUS_CODE": "409", "content-length": "230", "content-type": "application/xml", - "date": "Sun, 20 Feb 2022 07:09:23 GMT", + "date": "Sat, 25 Jun 2022 08:35:58 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "39306e7d-ff5a-4915-7056-e9406f87f5f7", + "x-ms-client-request-id": "93c2cbea-83c3-43dd-4ed0-15e39e983666", "x-ms-error-code": "ContainerAlreadyExists", - "x-ms-request-id": "29d5e18f-f01e-0042-7c28-266342000000", - "x-ms-version": "2020-08-04" + "x-ms-request-id": "0abe50d6-801e-0067-086e-88ca3e000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri?restype=container" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "369cc4e3-19c9-4cb6-5738-4ccb9ffd0cad", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "1a0438ef-eef1-442b-76df-5f63644f0c3b", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -82,24 +102,24 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Sun, 20 Feb 2022 07:09:24 GMT", - "etag": "\"0x8D9F43FED2BEDF1\"", - "last-modified": "Sun, 20 Feb 2022 07:09:24 GMT", + "date": "Sat, 25 Jun 2022 08:35:59 GMT", + "etag": "\"0x8DA5685BB846F69\"", + "last-modified": "Sat, 25 Jun 2022 08:36:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "369cc4e3-19c9-4cb6-5738-4ccb9ffd0cad", + "x-ms-client-request-id": "1a0438ef-eef1-442b-76df-5f63644f0c3b", "x-ms-content-crc64": "eeIkJntVfP0=", - "x-ms-request-id": "29d5e1eb-f01e-0042-4e28-266342000000", + "x-ms-request-id": "0abe511b-801e-0067-3c6e-88ca3e000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T07:09:24.8831985Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:36:00.3004265Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUridest" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "ff0dda4c-5d74-4015-6c1b-553b3fe1db6f", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "50eba16e-87e6-4030-4581-0e8f9b72cfe4", + "x-ms-version": "2021-04-10" }, "Method": "PUT", "Response": { @@ -107,24 +127,24 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Sun, 20 Feb 2022 07:09:24 GMT", - "etag": "\"0x8D9F43FED54098A\"", - "last-modified": "Sun, 20 Feb 2022 07:09:25 GMT", + "date": "Sat, 25 Jun 2022 08:36:00 GMT", + "etag": "\"0x8DA5685BBB90C39\"", + "last-modified": "Sat, 25 Jun 2022 08:36:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ff0dda4c-5d74-4015-6c1b-553b3fe1db6f", + "x-ms-client-request-id": "50eba16e-87e6-4030-4581-0e8f9b72cfe4", "x-ms-content-crc64": "eeIkJntVfP0=", - "x-ms-request-id": "29d5e2c8-f01e-0042-0928-266342000000", + "x-ms-request-id": "0abe5245-801e-0067-266e-88ca3e000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T07:09:25.1480484Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:36:00.6472274Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUridest" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "3b22ec6c-5928-4bb4-5090-ca11043d7340", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "21280641-6c84-4fe8-7e8a-46e51aed048c", + "x-ms-version": "2021-04-10" }, "Method": "HEAD", "Response": { @@ -136,34 +156,81 @@ "content-length": "100", "content-md5": "NqksyUqeD6IfYl+L+wB63w==", "content-type": "application/octet-stream", - "date": "Sun, 20 Feb 2022 07:09:25 GMT", - "etag": "\"0x8D9F43FED54098A\"", - "last-modified": "Sun, 20 Feb 2022 07:09:25 GMT", + "date": "Sat, 25 Jun 2022 08:36:00 GMT", + "etag": "\"0x8DA5685BBB90C39\"", + "last-modified": "Sat, 25 Jun 2022 08:36:00 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "vary": "Origin", "x-ms-access-tier": "Cool", - "x-ms-access-tier-change-time": "Sun, 20 Feb 2022 07:09:25 GMT", + "x-ms-access-tier-change-time": "Sat, 25 Jun 2022 08:36:00 GMT", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "3b22ec6c-5928-4bb4-5090-ca11043d7340", - "x-ms-creation-time": "Sun, 20 Feb 2022 07:09:25 GMT", + "x-ms-client-request-id": "21280641-6c84-4fe8-7e8a-46e51aed048c", + "x-ms-creation-time": "Sat, 25 Jun 2022 08:36:00 GMT", "x-ms-is-current-version": "true", - "x-ms-last-access-time": "Sun, 20 Feb 2022 07:09:25 GMT", + "x-ms-last-access-time": "Sat, 25 Jun 2022 08:36:00 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-k": "v", - "x-ms-request-id": "29d5e327-f01e-0042-5a28-266342000000", + "x-ms-request-id": "0abe5296-801e-0067-6c6e-88ca3e000000", "x-ms-server-encrypted": "true", "x-ms-tag-count": "1", - "x-ms-version": "2020-08-04", - "x-ms-version-id": "2022-02-20T07:09:25.1480484Z" + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:36:00.6472274Z" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUridest" }, { "Headers": { - "user-agent": "azsdk-cpp-storage-blobs/12.4.0-beta.1 (Windows 10 Pro 6.3 19041 19041.1.amd64fre.vb_release.191206-1406)", - "x-ms-client-request-id": "597a38e1-cccb-4806-7066-5f71235fa1bc", - "x-ms-version": "2020-08-04" + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "d4b00e3d-6917-41a2-4bf1-aa2f71234888", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Sat, 25 Jun 2022 08:36:01 GMT", + "etag": "\"0x8DA5685BC4029B6\"", + "last-modified": "Sat, 25 Jun 2022 08:36:01 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "d4b00e3d-6917-41a2-4bf1-aa2f71234888", + "x-ms-content-crc64": "eeIkJntVfP0=", + "x-ms-request-id": "0abe52e1-801e-0067-2e6e-88ca3e000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10", + "x-ms-version-id": "2022-06-25T08:36:01.5317190Z" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUridest" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "f367c302-0906-4b49-6a8b-034327cc7eab", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "\nsrctagsa1212", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "121", + "content-type": "application/xml", + "date": "Sat, 25 Jun 2022 08:36:03 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "vary": "Origin", + "x-ms-client-request-id": "f367c302-0906-4b49-6a8b-034327cc7eab", + "x-ms-request-id": "0abe5355-801e-0067-196e-88ca3e000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri/UploadFromUridest?comp=tags" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.5.0-beta.2 (Windows 10 Pro 6.3 19044 19041.1.amd64fre.vb_release.191206-1406)", + "x-ms-client-request-id": "a4648ef8-9309-463c-7938-4247079b46bd", + "x-ms-version": "2021-04-10" }, "Method": "DELETE", "Response": { @@ -171,11 +238,11 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Sun, 20 Feb 2022 07:09:25 GMT", + "date": "Sat, 25 Jun 2022 08:36:03 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "597a38e1-cccb-4806-7066-5f71235fa1bc", - "x-ms-request-id": "29d5e380-f01e-0042-2928-266342000000", - "x-ms-version": "2020-08-04" + "x-ms-client-request-id": "a4648ef8-9309-463c-7938-4247079b46bd", + "x-ms-request-id": "0abe5479-801e-0067-086e-88ca3e000000", + "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/blockblobclienttestuploadfromuri?restype=container" } diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index 82e7ca3244..f6ebc96202 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -4,6 +4,9 @@ ### Features Added +- Added support for encryption scope SAS (`ses` query parameter in SAS token). +- Added support for permanent delete permission in SAS. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp index ae1912f489..359f16a389 100644 --- a/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp +++ b/sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp @@ -188,6 +188,11 @@ namespace Azure { namespace Storage { namespace Sas { */ SetImmutabilityPolicy = 2048, + /** + * @brief Indicates that permanent delete is permitted. + */ + PermanentDelete = 4096, + /** * @brief Indicates that all permissions are set. */ @@ -250,6 +255,11 @@ namespace Azure { namespace Storage { namespace Sas { */ AccountSasResource ResourceTypes; + /** + * @brief Optional encryption scope to use when sending requests authorized with this SAS url. + */ + std::string EncryptionScope; + /** * @brief Sets the permissions for an account SAS. * diff --git a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp index 42e94d31cf..2a64dc90a4 100644 --- a/sdk/storage/azure-storage-common/src/account_sas_builder.cpp +++ b/sdk/storage/azure-storage-common/src/account_sas_builder.cpp @@ -9,7 +9,7 @@ namespace Azure { namespace Storage { namespace Sas { namespace { - constexpr static const char* SasVersion = "2020-08-04"; + constexpr static const char* SasVersion = "2021-04-10"; } void AccountSasBuilder::SetPermissions(AccountSasPermissions permissions) @@ -32,6 +32,11 @@ namespace Azure { namespace Storage { namespace Sas { { Permissions += "x"; } + if ((permissions & AccountSasPermissions::PermanentDelete) + == AccountSasPermissions::PermanentDelete) + { + Permissions += "y"; + } if ((permissions & AccountSasPermissions::List) == AccountSasPermissions::List) { Permissions += "l"; @@ -108,7 +113,8 @@ namespace Azure { namespace Storage { namespace Sas { std::string stringToSign = credential.AccountName + "\n" + Permissions + "\n" + services + "\n" + resourceTypes + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" - + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n"; + + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n" + + EncryptionScope + "\n"; std::string signature = Azure::Core::Convert::Base64Encode(_internal::HmacSha256( std::vector(stringToSign.begin(), stringToSign.end()), @@ -130,6 +136,10 @@ namespace Azure { namespace Storage { namespace Sas { } builder.AppendQueryParameter("spr", _internal::UrlEncodeQueryParameter(protocol)); builder.AppendQueryParameter("sig", _internal::UrlEncodeQueryParameter(signature)); + if (!EncryptionScope.empty()) + { + builder.AppendQueryParameter("ses", _internal::UrlEncodeQueryParameter(EncryptionScope)); + } return builder.GetAbsoluteUrl(); } diff --git a/sdk/storage/test-resources-post.ps1 b/sdk/storage/test-resources-post.ps1 index 268ab57d46..539c242e10 100644 --- a/sdk/storage/test-resources-post.ps1 +++ b/sdk/storage/test-resources-post.ps1 @@ -1,6 +1,13 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +param( + [string] $ResourceGroupName, + [hashtable] $DeploymentOutputs +) + +New-AzStorageEncryptionScope -ResourceGroupName $ResourceGroupName -StorageAccountName $DeploymentOutputs['ACCOUNT_NAME'] -EncryptionScopeName "EncryptionScopeForTest" -StorageEncryption + # This script is used to wait until XCache is refreshed for the service properties (30s), and role assignment takes effect (300s). Start-Sleep -s 300 From 5954ef7354f718a7ecbad2d1bb1ba775f4f3913e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Aug 2022 16:29:40 -0700 Subject: [PATCH 29/37] Sync eng/common directory with azure-sdk-tools for PR 3860 (#3871) * updating pfx and cert * update the targeted version of the proxy as well Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- eng/common/testproxy/dotnet-devcert.crt | 30 ++++++++++++------------ eng/common/testproxy/dotnet-devcert.pfx | Bin 2445 -> 2445 bytes eng/common/testproxy/target_version.txt | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/eng/common/testproxy/dotnet-devcert.crt b/eng/common/testproxy/dotnet-devcert.crt index e8575ea445..07976e52ef 100644 --- a/eng/common/testproxy/dotnet-devcert.crt +++ b/eng/common/testproxy/dotnet-devcert.crt @@ -1,20 +1,20 @@ -----BEGIN CERTIFICATE----- -MIIDSDCCAjCgAwIBAgIUPMKpJ/j10eQrcQBNnkImIaOYHakwDQYJKoZIhvcNAQEL -BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDgwNTAwMzU1NloXDTIyMDgw -NTAwMzU1NlowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAxe/ZseXgOTVoF7uTjX5Leknk95jIoyGc+VlxA8BhzGOr -r4u6VNQZRCMq+svHY36tW4+u/xHNe2kvbwy2mnS8cFFLfst+94qBZVJDBxSGZ9I/ -wekErNsjFsik4UrMvcC+ZlGPh7hb3f7tSx29tn1DIkAUXVnbZ6TT5s+mYRQpZ6fW -6kR3RNfc0A1IUM7Zs9yfNEr0O2H41P2HcLKoOPtvd7GvTQm9Ofh3srKvII+sZn/J -WH7r76oRQMX904mOMdryQwZLObsqX4dXIEbafKVSecB3PBVIhv8gVtJhcZbQP1pI -mMiWd6PHv46ZhGf7+cKnYUSa8Ia2t/wetK1wd00dFwIDAQABo4GRMIGOMA8GA1Ud +MIIDSDCCAjCgAwIBAgIUIoKu8Oao7j10TLNxaUG2Bs0FrRwwDQYJKoZIhvcNAQEL +BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIyMDgwNTIxMTcyM1oXDTIzMDgw +NTIxMTcyM1owFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA0UPG7ER++5/9D/qa4SCtt7QvdHwcpidbwktPNU8iRW7V +pIDPWS4goLp/+7+maT0Z/mqwSO3JDtm/dtdlr3F/5EMgyUExnYcvUixZAiyFyEwj +j6wnAtNvqsg4rDqBlD17fuqTVsZm9Yo7QYub6p5PeznWYucOxRrczqFCiW4uj0Yk +GgUHPPmCvhSDKowV8CYRHfkD6R8R4SFkoP3/uejXHxeXoYJNMWq5K0GqGaOZtNFB +F7QWZHoLrRpZcY4h+DxwP3c+/FdlVcs9nstkF+EnTnwx5IRyKsaWb/pUEmYKvNDz +wi6qnRUdu+DghZuvyZZDgwoYrSZokcbKumk0MsLC3QIDAQABo4GRMIGOMA8GA1Ud EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGmMBYGA1UdJQEB/wQMMAoGCCsGAQUF BwMBMBcGA1UdEQEB/wQNMAuCCWxvY2FsaG9zdDA6BgorBgEEAYI3VAEBBCwMKkFT UC5ORVQgQ29yZSBIVFRQUyBkZXZlbG9wbWVudCBjZXJ0aWZpY2F0ZTANBgkqhkiG -9w0BAQsFAAOCAQEAIj2VlBVcXGSly6KCBg6lgwFi+henWfSox77iuGAaAxDjN3jd -9lZahW4MPNLHKSrPRb4YNSLZ2jh7zdcttQrqd4qH65o1q56q5JrCmli99iIzY9Y8 -RdYyxK4Zzr31wjpsyFiWQfqJTuSFUUg9uDDj0negwEZLIGlt7nr12wflt2+QOJtD -byMeSZLbB5dPzn341DK0qfJEJMMgL0XsPEVZ3TQ6Alc9zq5wI608C/mXnz3xJE05 -UTYD8pRJJ/DyG0empvOVE8Sg93msHPquAbgqO9aqCpykgg/a8CFvI4wRdfvGEFlv -8XJKL8Y/PFsmFeO3axq3zUYKFVdc9Un4dFIaag== +9w0BAQsFAAOCAQEARX4NxGbycdPVuqvu/CO+/LpWrEm1OcOl7N57/mD5npTIJT78 +TYtXk1J61akumKdf5CaBgCDRcl35LhioFZIMEsiOidffAp6t493xocncFBhIYYrZ +HS6aKsZKPu8h3wOLpYu+zh7f0Hx6pkHPAfw4+knmQjDYomz/hTwuo/MuT8k6Ee7B +NGWqxUamLI8bucuf2ZfT1XOq83uWaFF5KwAuVLhpzo39/TmPyYGnaoKRYf9QjabS +LUjecMNLJFWHUSD4cKHvXJjDYZEiCiy+MdUDytWIsfw0fzAUjz9Qaz8YpZ+fXufM +MNMNfyJHSMEMFIT2D1UaQiwryXWQWJ93OiSdjA== -----END CERTIFICATE----- diff --git a/eng/common/testproxy/dotnet-devcert.pfx b/eng/common/testproxy/dotnet-devcert.pfx index 28058ae4ce30e7a413e8f872d930fa2cf5c2107c..a971cd950a1e42e5c03a5f0aebde478d8a70614d 100644 GIT binary patch delta 2311 zcmV+i3HbJn6O9v)U4KLwz`a{K}U2mpYB1E}N1nyh7MX`_CLGE&P2OCSf38YR4| z3=%R0yP3UYyBaIHiHOQRDR#UW;NKfzP2_-uQh9LnSvZ0N7{C_~qx#9H8TO0$q66Zx zxF_t8LYKb6bzwFX2x^~jZ5E)2dpe$HU6#K*v>HjhXa5$3MSo~7h|T%&ecj^z3b|Vd zpbPH}t%H3ZNvme298)-0Q1muXd6Nik($=2@&(C8JFhZb4<;~@j+fW)MfVK(FI>Z?+ zlaC&Np@7n2mM8?=-s0T>UlX;7n{|d?521>hj%S62uQYq8s~leS(iO4^Rps;rG&f40 zjt=&|1dpfjVSiB}r>N|x`?P(WYiMhcNZ9wP=dc}Pbh8ikg$U1B;p@j~G;zy}R2T&u zqC3cbRLWXCR%ctg2=Mp;*6EK>azpCo%sVM~^b#L+TounBJ|;nwOif61K=?X=eAw>y%nto}qkrtYb^mi(Ucy>vplM#y?s_z! z_O#mG?djUPHmen0M~eK0`iX>M$dj(E!g4P{A%|633 z9cli1R)6QEjhjnX!hpXUGje?bFE&%ak1rnQN_Pi#N-t+D>Lw%S->d=%C#PSo_laQJ z=UXN3gfA9pL+c0cMn)okN{WYCb2qD_^QpcL5wRcJsok$yev|Iu{hU!y0wuI*k+5W; zFr_hb5WHp-OAQpi{Me#rjXGk5* zA;=EDV!)N(G06pyeYFKoZ%XPI#HJ46B9kN4KwchlhQ81gL>7K;4H>b8CrL^JxI>OR zw|_`el#;Qul;c2nk!3&k>ryv!+t?mR)0WUt+^3zDnDF3mEiw6cNTym5PY;EHw2INA?`SgnmQPF2|ujI&)Bd@&geC2W7^e_1%%P7T6JAAR#pL` zb$+etEY6MT`gnrs=3DBa_JKBtwi@|jVzC@Rkp`w8DdOm!gOe2mMt}SobWuN3{=xzR z2ml0v1jwCc*1UmW6Gb>VaU;V0(ZCA+%8uAzW@*1L{%_rVXFA)T(2JNumhI#NYTCGX*}8}A%zB@`Ib{=olmSLzwY zh4g+!i%T+NiK|R;i*>E`OqXk&DMLA!~J)2goUN z;}qlNDw7F%4Z$40;EN`P=K)l=7rpxrOU#uE)u1qG_BT!#f6mVugq|PFpMh~dlorH) zlj?r)+yQLZ3D3+Bw_dn%LeCUQl{9GKu3fTNM8l`dzD64mB7Ty=WTRPTYy76j==D&5 zs+~Z9Q&FIdmw)!}xE`ELCoCJ1c4GE!n@D7N|-kBt0h(tL`|x5qy;^Pmb9~S!c{{q+=(qjzPH1(g!}$i zddA+vHDHF!FR-vlM2^0RZ+u%K$(+3`pHc_ABlX;m5}nRuNi}n75*CT)_}?tVV`@Tl z{W?j$xqpvmd=bpL-Gc__?-X5vg`6r1odrO5?kG6=Iq2fTej9P;_e8FwRebW^NVG<< zUfcJ^*>c#S2l)=%hU_A2p1i2WB6H)xo^aSpWaO*w`|er*c|eldeQa8Tbzbi`sG=5( z_1#TzZm~>p`PGt0lIZ3z%DChPwK@rPeIwhMW`Eez0F;q5ag*a}KW9epMo)N1xrp$a zfrUDW*xkFlSLr?TmF((i=lIm4hnWs#z`g+*R7^0%NIA^k30&Euw~>Zh@SV3Z zDn0plHnJvlYtJfWqlU89t`5@SOvp&1xiMpx;&I0ZY%tcqf=Q9@7FbBWbLXo-R`j1t zseiKU6JotI#+m{6+diOGE%dt=S|#a?#2+BfjCa?Ov~$I86b9#%vV2UFKSEc-*$I}5jkM*+ja_g1b=w# zhnH@)O7suyph&7BJDLjFz!Z4msyli99t^n$v^3Rcqf;EMpTQ73{YhcgaDh>!TzJop zi)G>#*Ob8oP|;{4k>2?is*c0f5mbpb_ahHM?1)NaZt*IN9F%zcH((<%B`_lf2`Yw2 zhW8Bt2^BFG1QbC7aCxMw#~G>_hddqrDGUC^5z3P=F)$%82?hl#4g&%j1povTv<;4F h#W825pUKW`Rlb&$9I9pK1PCwl=9i$=>oNiY2mm^`ZGZp( delta 2311 zcmV+i3HbJn6O9v)U4QzFW>WI?54HjV2mpYB1E?0@CigS-n3b8=c^p`^>Xld4L8IXF zXX**plkyrolD$iHRfuNMbYH1Vg$&`IXLC8KZg1I@5aQ%qhaCxoSOZ~kLbz+LThOFL z6Gn#mncW-6_3`=|Wzo6*lFmRlJlCW`*qpHa+7drZVMAy*V}GOe!b)|WF2zWX!WCSc z9TD&$N%u7y^k!|tmc5lfjL*K^S15Vd@E97U55w>=fwmQpVdG&vHN|UXPJ9J2W?x|o zlFjTAkZbY{Q~r|#^;)-!0p?Obt6Pn_q#o*X&FM$-y8_65_5R{o`zX}pG*0oTqGKIxj&#LEnA*cJd` z4o>rCO{9qPro)dfDY|tf5h8?&ybx1Q(mqGdZ@F68(I20qV$Ww*MkOc6%<{I6M@Ea> z%dNGtWX@6Z9qUq6PRMv49U#)#rQhvM@p$}9xz2q4i+>SER>$+(i3I7wN%0WlLi$Qg z)hxg70s1&|j7z)JDh9wJc|dMI_w{Xi;`IO3=m=f6)?`1Dx{gvK?CJ4Jgki*)nkb&8 zdzo#S^Ysym`gUN&gyZNK@%+olxQYcjE6r{}BX3?x28;IEqwDAnl%4;|oc<)lZw6pC z*<7P5y?>uHluJQQb*q7oEMx;Iv5nRHha|wadMw+oatmSVX&%P9T}+rcT9#c)%5JpE zl@2DEH@_v=_=^12n-876*9}&x=Ss_M>gP)oRI~VNO+u}^P!)UF8H;iZ@VV4I+kDR- zdCQhI9KE_JA;(yWKg+Flo;g6ww}n{>s^H|7Z-2m^)isVCPce!Kw-BU;;5U8VAo~8{ zpSQRkK!m$Cij_K}1#H91<9okACjXgH&ofFdkpJ4;OHG|^sC|hd+61JA!@b_3@gbtu z*7l^<*OQ81kZZf7GPj# zHGf6#A;BjhP-l;$sN26t9)diF+&75^L_4N_K1Ky%wHx)diWmkW*PeHksF8t%NEY-O zCSWsC4okLYY|(%Iopf7_gxjV)GX`S4PDR29Aej7_3bgw-|I2_E4hROZ!nfQ~=z=yu zPo7{fzlJlw!D-9BvI#R^udMImyorVg_CL>x-U|)m(I~nM5)+-EALZrx$q}7(8q82f zbjL&iI^1GaSX)a6ke61=aZIowX?kJU=&8>Ss|}VAO#WBxGm{krMt}8*Eb9;+^h5#z z2ml0v1jxDm=AZ31%Hx(vqoH!EA<$DnO^GSt0${#G9~PsK8x7z)E7=m-Twp|yaGYo9 zcHlax7Q09)Pv4mIlN?h?=VT>`*dT=*R2&vAFRV$3g&u~V6u_YvweZak`2rJqBZl*H zPmU(=DDuaX5?SiJhkxL-g7XeeAI93ERX;iAsCu&4No3)^P|CSEg8hv{Hg)SttGCyASV#+8&;sBEIp7UxjYguGQqSPzvnALj> z91TEO-EHw-5_Fts=>`$;UDk7n7X`UYErd7r-OA8P54F@Fq60%y9>cfkB;l0d?& z9%&ug^tL@s9P7ob*g!Mb(yIdHwyu85qbjSBeci6ovN@2Sp9bTp86dRFC|0+{=czdM zK>hVb)HGcrK7-cSS3%b&wZ1_tS33Bi5^oq>m&Vlu#`QS8x!kgkD^ zk2plENCNFdI#sZCz~OAAG*xS77fh8|wPW4O-4<4~rhj}e1MO(F)Rna27z_NNmcU4` zo8+ETaVg=;%UN6B;-C7YKLocqNS`*ezVK{Ksz0>64_^m&2+CvqcD1mpIBQ;vh2ta z2JEI7fqzZ(-APOs@Sks-$c{10^~y!T#1%a%lfrFMXz(ihbMzN(0`wu)}CB9W;W+@CSIUAfCV!MT$} zMCe6~7sf`pmE|DYF;RWcLW`87ClA0X-6l`Wm%&v2uKlzCS1yN!o`m1Soesyz5F!CB z08hXnh diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt index 640f3e5d1d..c390d38a46 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20220630.4 +1.0.0-dev.20220805.3 From 1f82325143c1c4d23aaa43909abfd0f6da12904a Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Mon, 8 Aug 2022 17:59:26 -0700 Subject: [PATCH 30/37] Storage August Preview Release (#3868) * Storage August Preview Release * update versions --- sdk/storage/azure-storage-blobs/CHANGELOG.md | 2 +- sdk/storage/azure-storage-blobs/CMakeLists.txt | 4 ++-- .../azure-storage-blobs/src/private/package_version.hpp | 4 ++-- sdk/storage/azure-storage-blobs/vcpkg.json | 4 ++-- sdk/storage/azure-storage-blobs/vcpkg/Config.cmake.in | 2 +- sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json | 2 +- sdk/storage/azure-storage-common/CHANGELOG.md | 8 +------- sdk/storage/azure-storage-common/CMakeLists.txt | 4 ++-- sdk/storage/azure-storage-common/vcpkg.json | 4 ++-- sdk/storage/azure-storage-common/vcpkg/Config.cmake.in | 2 +- sdk/storage/azure-storage-common/vcpkg/vcpkg.json | 2 +- 11 files changed, 16 insertions(+), 22 deletions(-) diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index 7683eb758b..63ef8dc3d6 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 12.6.0-beta1 (Unreleased) +## 12.6.0-beta.1 (2022-08-09) ### Features Added diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt index 8ecec312ec..19c1a3e838 100644 --- a/sdk/storage/azure-storage-blobs/CMakeLists.txt +++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt @@ -32,9 +32,9 @@ if(FETCH_SOURCE_DEPS) add_subdirectory(${oneFolder} EXCLUDE_FROM_ALL) endforeach() elseif(NOT AZ_ALL_LIBRARIES) - find_package(azure-storage-common-cpp "12.2.4" CONFIG QUIET) + find_package(azure-storage-common-cpp "12.3.0-beta.1" CONFIG QUIET) if(NOT azure-storage-common-cpp_FOUND) - find_package(azure-storage-common-cpp "12.2.4" REQUIRED) + find_package(azure-storage-common-cpp "12.3.0-beta.1" REQUIRED) endif() endif() diff --git a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp index 8b751729f4..4112735b1a 100644 --- a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp +++ b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp @@ -9,9 +9,9 @@ #pragma once #define AZURE_STORAGE_BLOBS_VERSION_MAJOR 12 -#define AZURE_STORAGE_BLOBS_VERSION_MINOR 5 +#define AZURE_STORAGE_BLOBS_VERSION_MINOR 6 #define AZURE_STORAGE_BLOBS_VERSION_PATCH 0 -#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "" +#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "beta.1" #define AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) #i #define AZURE_STORAGE_BLOBS_VERSION_ITOA(i) AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) diff --git a/sdk/storage/azure-storage-blobs/vcpkg.json b/sdk/storage/azure-storage-blobs/vcpkg.json index f253d39633..2fc9d767eb 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg.json +++ b/sdk/storage/azure-storage-blobs/vcpkg.json @@ -1,6 +1,6 @@ { "name": "azure-storage-blobs-cpp", - "version-semver": "12.5.0", + "version-semver": "12.6.0-beta.1", "description": [ "Microsoft Azure Storage Blobs SDK for C++", "This library provides Azure Storage Blobs SDK." @@ -11,7 +11,7 @@ { "name": "azure-storage-common-cpp", "default-features": false, - "version>=": "12.2.4" + "version>=": "12.3.0-beta.1" }, { "name": "vcpkg-cmake", diff --git a/sdk/storage/azure-storage-blobs/vcpkg/Config.cmake.in b/sdk/storage/azure-storage-blobs/vcpkg/Config.cmake.in index a6e782faf9..99a32a3442 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg/Config.cmake.in +++ b/sdk/storage/azure-storage-blobs/vcpkg/Config.cmake.in @@ -4,7 +4,7 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(azure-storage-common-cpp "12.2.4") +find_dependency(azure-storage-common-cpp "12.3.0-beta.1") include("${CMAKE_CURRENT_LIST_DIR}/azure-storage-blobs-cppTargets.cmake") diff --git a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json index bb78077f9a..8b020d6eff 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json @@ -14,7 +14,7 @@ { "name": "azure-storage-common-cpp", "default-features": false, - "version>=": "12.2.4" + "version>=": "12.3.0-beta.1" }, { "name": "vcpkg-cmake", diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index f6ebc96202..89c450f7b6 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,18 +1,12 @@ # Release History -## 12.3.0-beta.1 (Unreleased) +## 12.3.0-beta.1 (2022-08-09) ### Features Added - Added support for encryption scope SAS (`ses` query parameter in SAS token). - Added support for permanent delete permission in SAS. -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 12.2.4 (2022-06-07) ### Bugs Fixed diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt index ad8759b9f5..21baa9313d 100644 --- a/sdk/storage/azure-storage-common/CMakeLists.txt +++ b/sdk/storage/azure-storage-common/CMakeLists.txt @@ -32,9 +32,9 @@ if(FETCH_SOURCE_DEPS) add_subdirectory(${oneFolder} EXCLUDE_FROM_ALL) endforeach() elseif(NOT AZ_ALL_LIBRARIES) - find_package(azure-core-cpp "1.5.0" CONFIG QUIET) + find_package(azure-core-cpp "1.7.1" CONFIG QUIET) if(NOT azure-core-cpp_FOUND) - find_package(azure-core-cpp "1.5.0" REQUIRED) + find_package(azure-core-cpp "1.7.1" REQUIRED) endif() endif() diff --git a/sdk/storage/azure-storage-common/vcpkg.json b/sdk/storage/azure-storage-common/vcpkg.json index 448f7f7bc3..10a5ae49ec 100644 --- a/sdk/storage/azure-storage-common/vcpkg.json +++ b/sdk/storage/azure-storage-common/vcpkg.json @@ -1,6 +1,6 @@ { "name": "azure-storage-common-cpp", - "version-semver": "12.2.4", + "version-semver": "12.3.0-beta.1", "description": [ "Microsoft Azure Common Storage SDK for C++", "This library provides common Azure Storage-related abstractions for Azure SDK." @@ -11,7 +11,7 @@ { "name": "azure-core-cpp", "default-features": false, - "version>=": "1.5.0" + "version>=": "1.7.1" }, { "name": "libxml2", diff --git a/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in b/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in index f92c6f19be..3ac85c7dd0 100644 --- a/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in +++ b/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in @@ -5,7 +5,7 @@ include(CMakeFindDependencyMacro) find_dependency(Threads) -find_dependency(azure-core-cpp "1.5.0") +find_dependency(azure-core-cpp "1.7.1") if(NOT WIN32) find_dependency(LibXml2) diff --git a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json index 76b59e120b..3ddfbab70d 100644 --- a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json @@ -14,7 +14,7 @@ { "name": "azure-core-cpp", "default-features": false, - "version>=": "1.5.0" + "version>=": "1.7.1" }, { "name": "libxml2", From b5c456c712afabf5b6af19854dc0aa1968324d73 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Aug 2022 19:39:33 -0700 Subject: [PATCH 31/37] Increment version for storage releases (#3875) * Increment package version after release of azure-storage-common * Increment package version after release of azure-storage-blobs --- sdk/storage/azure-storage-blobs/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- sdk/storage/azure-storage-common/CHANGELOG.md | 10 ++++++++++ .../src/private/package_version.hpp | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blobs/CHANGELOG.md b/sdk/storage/azure-storage-blobs/CHANGELOG.md index 63ef8dc3d6..09af321dd0 100644 --- a/sdk/storage/azure-storage-blobs/CHANGELOG.md +++ b/sdk/storage/azure-storage-blobs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.6.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.6.0-beta.1 (2022-08-09) ### Features Added diff --git a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp index 4112735b1a..86c7dd8e07 100644 --- a/sdk/storage/azure-storage-blobs/src/private/package_version.hpp +++ b/sdk/storage/azure-storage-blobs/src/private/package_version.hpp @@ -11,7 +11,7 @@ #define AZURE_STORAGE_BLOBS_VERSION_MAJOR 12 #define AZURE_STORAGE_BLOBS_VERSION_MINOR 6 #define AZURE_STORAGE_BLOBS_VERSION_PATCH 0 -#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "beta.1" +#define AZURE_STORAGE_BLOBS_VERSION_PRERELEASE "beta.2" #define AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) #i #define AZURE_STORAGE_BLOBS_VERSION_ITOA(i) AZURE_STORAGE_BLOBS_VERSION_ITOA_HELPER(i) diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index 89c450f7b6..10404b2873 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.3.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.3.0-beta.1 (2022-08-09) ### Features Added diff --git a/sdk/storage/azure-storage-common/src/private/package_version.hpp b/sdk/storage/azure-storage-common/src/private/package_version.hpp index c1ddc04729..009cfc55f3 100644 --- a/sdk/storage/azure-storage-common/src/private/package_version.hpp +++ b/sdk/storage/azure-storage-common/src/private/package_version.hpp @@ -13,7 +13,7 @@ #define AZURE_STORAGE_COMMON_VERSION_MAJOR 12 #define AZURE_STORAGE_COMMON_VERSION_MINOR 3 #define AZURE_STORAGE_COMMON_VERSION_PATCH 0 -#define AZURE_STORAGE_COMMON_VERSION_PRERELEASE "beta.1" +#define AZURE_STORAGE_COMMON_VERSION_PRERELEASE "beta.2" #define AZURE_STORAGE_COMMON_VERSION_ITOA_HELPER(i) #i #define AZURE_STORAGE_COMMON_VERSION_ITOA(i) AZURE_STORAGE_COMMON_VERSION_ITOA_HELPER(i) From e019b3ea7e888603165013f564449842ba479d59 Mon Sep 17 00:00:00 2001 From: keshen-msft <53491277+keshen-msft@users.noreply.github.com> Date: Wed, 10 Aug 2022 12:59:47 -0700 Subject: [PATCH 32/37] Fix an issue that reason phrase is missing as expected from HTTP/2 server (#3879) * Fix an issue that reason phrase is missing as expected from HTTP/2 server * reverse the condition * compact comments * fix clang format --- .../src/http/winhttp/win_http_transport.cpp | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp b/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp index 7726305bf9..437f94e7be 100644 --- a/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp +++ b/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp @@ -622,17 +622,27 @@ std::unique_ptr WinHttpTransport::SendRequestAndGetResponse( std::string reasonPhrase; DWORD sizeOfReasonPhrase = sizeOfHeaders; - if (WinHttpQueryHeaders( - handleManager->m_requestHandle, - WINHTTP_QUERY_STATUS_TEXT, - WINHTTP_HEADER_NAME_BY_INDEX, - outputBuffer.data(), - &sizeOfReasonPhrase, - WINHTTP_NO_HEADER_INDEX)) + // HTTP/2 does not support reason phrase, refer to + // https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2.4. + if (majorVersion == 1) { - start = outputBuffer.begin(); - reasonPhrase - = WideStringToString(std::wstring(start, start + sizeOfReasonPhrase / sizeof(WCHAR))); + if (WinHttpQueryHeaders( + handleManager->m_requestHandle, + WINHTTP_QUERY_STATUS_TEXT, + WINHTTP_HEADER_NAME_BY_INDEX, + outputBuffer.data(), + &sizeOfReasonPhrase, + WINHTTP_NO_HEADER_INDEX)) + { + // even with HTTP/1.1, we cannot assume that reason phrase is set since it is optional + // according to https://www.rfc-editor.org/rfc/rfc2616.html#section-6.1.1. + if (sizeOfReasonPhrase > 0) + { + start = outputBuffer.begin(); + reasonPhrase + = WideStringToString(std::wstring(start, start + sizeOfReasonPhrase / sizeof(WCHAR))); + } + } } // Allocate the instance of the response on the heap with a shared ptr so this memory gets From c152c05d4a56074d20451b7efa483bbf17bef116 Mon Sep 17 00:00:00 2001 From: microzchang <110015819+microzchang@users.noreply.github.com> Date: Thu, 11 Aug 2022 13:38:27 +0800 Subject: [PATCH 33/37] Update CODEOWNERS (#3881) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index aedc472e01..39e0af410d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -36,7 +36,7 @@ /sdk/keyvault/ @vhvb1989 @gearama @antkmsft @rickwinter # PRLabel: %Storage -/sdk/storage/ @vinjiang @katmsft @Jinming-Hu @EmmaZhu @antkmsft @vhvb1989 @gearama @LarryOsterman +/sdk/storage/ @vinjiang @katmsft @Jinming-Hu @EmmaZhu @antkmsft @vhvb1989 @gearama @LarryOsterman @microzchang # PRLabel: %EngSys /sdk/template/ @danieljurek @weshaggard From 82d444620984ea93e63851026004f16e21906230 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 15 Aug 2022 14:27:19 -0700 Subject: [PATCH 34/37] updated targeted proxy version to one that properly allows consumption of TLS certificates (#3888) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- eng/common/testproxy/target_version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt index c390d38a46..0ea1143fba 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20220805.3 +1.0.0-dev.20220810.2 From 2dd3dbe3f68569a2bb1a55a6e8dc208bf83a0809 Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Tue, 16 Aug 2022 20:24:39 -0700 Subject: [PATCH 35/37] Fix `azure-storage-blobs-cpp` beta install (#3889) Co-authored-by: Anton Kolesnyk --- sdk/storage/azure-storage-blobs/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt index 19c1a3e838..9cb06ad5b6 100644 --- a/sdk/storage/azure-storage-blobs/CMakeLists.txt +++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt @@ -32,9 +32,9 @@ if(FETCH_SOURCE_DEPS) add_subdirectory(${oneFolder} EXCLUDE_FROM_ALL) endforeach() elseif(NOT AZ_ALL_LIBRARIES) - find_package(azure-storage-common-cpp "12.3.0-beta.1" CONFIG QUIET) + find_package(azure-storage-common-cpp CONFIG QUIET) if(NOT azure-storage-common-cpp_FOUND) - find_package(azure-storage-common-cpp "12.3.0-beta.1" REQUIRED) + find_package(azure-storage-common-cpp REQUIRED) endif() endif() From 634df137e3829037fadc267359f78354d883c6c6 Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Wed, 24 Aug 2022 14:22:53 -0700 Subject: [PATCH 36/37] Fixed #3899 - Handle new OSX version correctly; reformatted platform-matrix JSON files (#3900) --- .../stages/platform-matrix-cmakegenerate.json | 40 +-- .../platform-matrix-cmakesourcegenerate.json | 40 +-- .../stages/platform-matrix-live.json | 290 ++++++++--------- .../templates/stages/platform-matrix.json | 308 +++++++++--------- eng/scripts/Get-BinarySizes.ps1 | 23 +- 5 files changed, 354 insertions(+), 347 deletions(-) diff --git a/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json b/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json index a0ac2ef0c0..c6b27addaa 100644 --- a/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json +++ b/eng/pipelines/templates/stages/platform-matrix-cmakegenerate.json @@ -1,23 +1,23 @@ { - "matrix": { - "CmakeEnvArg": "", - "OSConfig": { - "Linux": { - "Pool": "azsdk-pool-mms-ubuntu-1804-general", - "OSVmImage": "MMSUbuntu18.04", - "AptDependencies": "libcurl4-openssl-dev", - "VCPKG_DEFAULT_TRIPLET": "x64-linux" - }, - "Windows": { - "Pool": "azsdk-pool-mms-win-2019-general", - "OSVmImage": "MMS2019", - "VCPKG_DEFAULT_TRIPLET": "x64-windows" - }, - "Mac": { - "Pool": "Azure Pipelines", - "OSVmImage": "macos-11", - "VCPKG_DEFAULT_TRIPLET": "x64-osx" - } - } + "matrix": { + "CmakeEnvArg": "", + "OSConfig": { + "Linux": { + "Pool": "azsdk-pool-mms-ubuntu-1804-general", + "OSVmImage": "MMSUbuntu18.04", + "AptDependencies": "libcurl4-openssl-dev", + "VCPKG_DEFAULT_TRIPLET": "x64-linux" + }, + "Windows": { + "Pool": "azsdk-pool-mms-win-2019-general", + "OSVmImage": "MMS2019", + "VCPKG_DEFAULT_TRIPLET": "x64-windows" + }, + "Mac": { + "Pool": "Azure Pipelines", + "OSVmImage": "macos-11", + "VCPKG_DEFAULT_TRIPLET": "x64-osx" + } } + } } diff --git a/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json b/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json index 49ac2e648a..07e9fbc210 100644 --- a/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json +++ b/eng/pipelines/templates/stages/platform-matrix-cmakesourcegenerate.json @@ -1,23 +1,23 @@ { - "matrix": { - "OSConfig": { - "Windows": { - "Pool": "azsdk-pool-mms-win-2019-general", - "OSVmImage": "MMS2019", - "CmakeEnvArg": "" - }, - "Linux": { - "Pool": "azsdk-pool-mms-ubuntu-1804-general", - "OSVmImage": "MMSUbuntu18.04", - "CmakeEnvArg": "", - "AptDependencies": "libcurl4-openssl-dev" - }, - "Mac": { - "Pool": "Azure Pipelines", - "OSVmImage": "macos-11", - "CmakeEnvArg": "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include ", - "BrewDependencies": "openssl" - } - } + "matrix": { + "OSConfig": { + "Windows": { + "Pool": "azsdk-pool-mms-win-2019-general", + "OSVmImage": "MMS2019", + "CmakeEnvArg": "" + }, + "Linux": { + "Pool": "azsdk-pool-mms-ubuntu-1804-general", + "OSVmImage": "MMSUbuntu18.04", + "CmakeEnvArg": "", + "AptDependencies": "libcurl4-openssl-dev" + }, + "Mac": { + "Pool": "Azure Pipelines", + "OSVmImage": "macos-11", + "CmakeEnvArg": "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include ", + "BrewDependencies": "openssl" + } } + } } diff --git a/eng/pipelines/templates/stages/platform-matrix-live.json b/eng/pipelines/templates/stages/platform-matrix-live.json index 7e9f018107..ef2b46fd8f 100644 --- a/eng/pipelines/templates/stages/platform-matrix-live.json +++ b/eng/pipelines/templates/stages/platform-matrix-live.json @@ -1,152 +1,152 @@ { - "displayNames": { - "_": "" + "displayNames": { + "_": "" + }, + "include": [ + { + "StaticConfigs": { + "MacOS_x64_with_unit_test": { + "Pool": "Azure Pipelines", + "OSVmImage": "macos-11", + "VCPKG_DEFAULT_TRIPLET": "x64-osx", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON", + "AZURE_CORE_ENABLE_JSON_TESTS": 1, + "BuildArgs": "-j 4" + } + } + }, + { + "StaticConfigs": { + "_": { + "VCPKG_DEFAULT_TRIPLET": "x64-linux", + "BuildArgs": "-j 4", + "Pool": "azsdk-pool-mms-ubuntu-1804-general", + "OSVmImage": "MMSUbuntu18.04" + } + }, + "BuildConfig": { + "Linux_x64_gcc5_with_unit_test": { + "CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 cmake", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON" + }, + "Linux_x64_with_unit_test": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON", + "AptDependencies": "gcovr lcov", + "CODE_COVERAGE": "enabled", + "CODE_COVERAGE_COLLECT_ONLY": 1, + "AZURE_CORE_ENABLE_JSON_TESTS": 1 + } + } + }, + { + "StaticConfigs": { + "_": { + "BuildArgs": "-j 4", + "Pool": "azsdk-pool-mms-ubuntu-2004-general", + "OSVmImage": "MMSUbuntu20.04", + "VCPKG_DEFAULT_TRIPLET": "x64-linux" + } + }, + "BuildConfiguration": { + "Ubuntu20_x64_with_unit_test": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON", + "AZURE_CORE_ENABLE_JSON_TESTS": 1 + }, + "Ubuntu20_samples": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DCMAKE_BUILD_TYPE=Release ", + "RunSamples": 1 + }, + "Ubuntu20_x64_no_rtti": { + "CmakeArgs": " -DBUILD_RTTI=OFF -DCMAKE_BUILD_TYPE=Release " + } + } }, - "include": [ - { - "StaticConfigs": { - "MacOS_x64_with_unit_test": { - "Pool": "Azure Pipelines", - "OSVmImage": "macos-11", - "VCPKG_DEFAULT_TRIPLET": "x64-osx", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON", - "AZURE_CORE_ENABLE_JSON_TESTS": 1, - "BuildArgs": "-j 4" - } - } + { + "StaticConfigs": { + "_": { + "Pool": "azsdk-pool-mms-win-2019-general", + "OSVmImage": "MMS2019", + "CMAKE_GENERATOR": "Visual Studio 16 2019" + } + }, + "BuildConfig": { + "Win_x86_with_unit_test_winHttp": { + "VcpkgInstall": "openssl", + "CMAKE_GENERATOR_PLATFORM": "Win32", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", + "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", + "WindowsCtestConfig": "-C Release", + "BuildArgs": "-v --parallel 8 --config Release" + }, + "Win_x86_no_rtti_with_unit_test": { + "VcpkgInstall": "libxml2 openssl", + "CMAKE_GENERATOR_PLATFORM": "Win32", + "CmakeArgs": " -DBUILD_RTTI=OFF -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON", + "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", + "WindowsCtestConfig": "-C Release", + "BuildArgs": "-v --parallel 8 --config Release" + }, + "Win_x86_with_unit_test_libcurl": { + "CMAKE_GENERATOR_PLATFORM": "Win32", + "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", + "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", + "BuildArgs": "-v --parallel 8" + }, + "Win_x64_with_json_unit_test_winHttp": { + "VcpkgInstall": "openssl", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "AZURE_CORE_ENABLE_JSON_TESTS": 1, + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "WindowsCtestConfig": "-C Release" + }, + "Win_x64_with_json_unit_samples_winHttp": { + "VcpkgInstall": "openssl", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "AZURE_CORE_ENABLE_JSON_TESTS": 1, + "RunSamples": 1, + "WindowsCtestConfig": "-C Release" + }, + "Win_x64_with_unit_test_winHttp": { + "VcpkgInstall": "openssl", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "WindowsCtestConfig": "-C Release" }, - { - "StaticConfigs": { - "_": { - "VCPKG_DEFAULT_TRIPLET": "x64-linux", - "BuildArgs": "-j 4", - "Pool": "azsdk-pool-mms-ubuntu-1804-general", - "OSVmImage": "MMSUbuntu18.04" - } - }, - "BuildConfig": { - "Linux_x64_gcc5_with_unit_test": { - "CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 cmake", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON" - }, - "Linux_x64_with_unit_test": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON", - "AptDependencies": "gcovr lcov", - "CODE_COVERAGE": "enabled", - "CODE_COVERAGE_COLLECT_ONLY": 1, - "AZURE_CORE_ENABLE_JSON_TESTS": 1 - } - } + "Win_x64_with_unit_samples_winHttp": { + "VcpkgInstall": "openssl", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "RunSamples": 1, + "WindowsCtestConfig": "-C Release" }, - { - "StaticConfigs": { - "_": { - "BuildArgs": "-j 4", - "Pool": "azsdk-pool-mms-ubuntu-2004-general", - "OSVmImage": "MMSUbuntu20.04", - "VCPKG_DEFAULT_TRIPLET": "x64-linux" - } - }, - "BuildConfiguration": { - "Ubuntu20_x64_with_unit_test": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON", - "AZURE_CORE_ENABLE_JSON_TESTS": 1 - }, - "Ubuntu20_samples": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DCMAKE_BUILD_TYPE=Release ", - "RunSamples": 1 - }, - "Ubuntu20_x64_no_rtti": { - "CmakeArgs": " -DBUILD_RTTI=OFF -DCMAKE_BUILD_TYPE=Release " - } - } + "HSM_Win_x64_with_unit_test_libcurl": { + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "WindowsCtestConfig": "-C Release", + "KVLocation": "eastus2", + "EnableHSM": 1 }, - { - "StaticConfigs": { - "_": { - "Pool": "azsdk-pool-mms-win-2019-general", - "OSVmImage": "MMS2019", - "CMAKE_GENERATOR": "Visual Studio 16 2019" - } - }, - "BuildConfig": { - "Win_x86_with_unit_test_winHttp": { - "VcpkgInstall": "openssl", - "CMAKE_GENERATOR_PLATFORM": "Win32", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", - "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", - "WindowsCtestConfig": "-C Release", - "BuildArgs": "-v --parallel 8 --config Release" - }, - "Win_x86_no_rtti_with_unit_test": { - "VcpkgInstall": "libxml2 openssl", - "CMAKE_GENERATOR_PLATFORM": "Win32", - "CmakeArgs": " -DBUILD_RTTI=OFF -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON", - "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", - "WindowsCtestConfig": "-C Release", - "BuildArgs": "-v --parallel 8 --config Release" - }, - "Win_x86_with_unit_test_libcurl": { - "CMAKE_GENERATOR_PLATFORM": "Win32", - "VCPKG_DEFAULT_TRIPLET": "x86-windows-static", - "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", - "BuildArgs": "-v --parallel 8" - }, - "Win_x64_with_json_unit_test_winHttp": { - "VcpkgInstall": "openssl", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "AZURE_CORE_ENABLE_JSON_TESTS": 1, - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "WindowsCtestConfig": "-C Release" - }, - "Win_x64_with_json_unit_samples_winHttp": { - "VcpkgInstall": "openssl", - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "AZURE_CORE_ENABLE_JSON_TESTS": 1, - "RunSamples": 1, - "WindowsCtestConfig": "-C Release" - }, - "Win_x64_with_unit_test_winHttp": { - "VcpkgInstall": "openssl", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "WindowsCtestConfig": "-C Release" - }, - "Win_x64_with_unit_samples_winHttp": { - "VcpkgInstall": "openssl", - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "RunSamples": 1, - "WindowsCtestConfig": "-C Release" - }, - "HSM_Win_x64_with_unit_test_libcurl": { - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DMSVC_USE_STATIC_CRT=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "WindowsCtestConfig": "-C Release", - "KVLocation": "eastus2", - "EnableHSM": 1 - }, - "Win_x64_with_unit_samples_libcurl": { - "VcpkgInstall": "curl[winssl] openssl", - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", - "CMAKE_GENERATOR_PLATFORM": "x64", - "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON ", - "BuildArgs": "-v --parallel 8 --config Release", - "RunSamples": 1, - "WindowsCtestConfig": "-C Release" - } - } + "Win_x64_with_unit_samples_libcurl": { + "VcpkgInstall": "curl[winssl] openssl", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "CMAKE_GENERATOR_PLATFORM": "x64", + "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON -DMSVC_USE_STATIC_CRT=ON ", + "BuildArgs": "-v --parallel 8 --config Release", + "RunSamples": 1, + "WindowsCtestConfig": "-C Release" } - ] + } + } + ] } \ No newline at end of file diff --git a/eng/pipelines/templates/stages/platform-matrix.json b/eng/pipelines/templates/stages/platform-matrix.json index 889b8392c3..53a0b5cbe1 100644 --- a/eng/pipelines/templates/stages/platform-matrix.json +++ b/eng/pipelines/templates/stages/platform-matrix.json @@ -1,162 +1,162 @@ { - "displayNames": { - "_": "" + "displayNames": { + "_": "" + }, + "include": [ + { + "OSConfiguration": { + "macOS-11": { + "OSVmImage": "macos-11", + "XCODE_VERSION": "12.5.1" + } + }, + "StaticConfigs": { + "_": { + "Pool": "Azure Pipelines", + "BuildArgs": "-j 10", + "VCPKG_DEFAULT_TRIPLET": "x64-osx", + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON", + "PublishMapFiles": "true" + } + }, + "BuildConfig": { + "debug": { + "CMAKE_BUILD_TYPE": "Debug" + }, + "release": { + "CMAKE_BUILD_TYPE": "Release" + } + } + }, + { + "StaticConfigs": { + "Windows2019": { + "OSVmImage": "MMS2019", + "Pool": "azsdk-pool-mms-win-2019-general", + "CMAKE_GENERATOR": "Visual Studio 16 2019" + } + }, + "TargetPlatform": { + "Win32Api_curl": { + "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON" + }, + "Win32Api_release_curl": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON -DMSVC_USE_STATIC_CRT=ON", + "BuildArgs": "--parallel 8 --config Release", + "PublishMapFiles": "true" + }, + "Win32Api_debug_tests": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_TRANSPORT_WINHTTP=ON -DMSVC_USE_STATIC_CRT=ON", + "BuildArgs": "--parallel 8 --config Debug", + "PublishMapFiles": "true" + } + }, + "TargetArchitecture": { + "x86": { + "CMAKE_GENERATOR_PLATFORM": "Win32", + "VCPKG_DEFAULT_TRIPLET": "x86-windows-static" + }, + "x64": { + "CMAKE_GENERATOR_PLATFORM": "x64", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static" + } + } }, - "include": [ - { - "OSConfiguration": { - "macOS-11": { - "OSVmImage": "macos-11", - "XCODE_VERSION": "12.5.1" - } - }, - "StaticConfigs": { - "_": { - "Pool": "Azure Pipelines", - "BuildArgs": "-j 10", - "VCPKG_DEFAULT_TRIPLET": "x64-osx", - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON", - "PublishMapFiles": "true" - } - }, - "BuildConfig": { - "debug": { - "CMAKE_BUILD_TYPE": "Debug" - }, - "release": { - "CMAKE_BUILD_TYPE": "Release" - } - } + { + "StaticConfigs": { + "Windows2019": { + "VcpkgInstall": "openssl", + "OSVmImage": "MMS2019", + "Pool": "azsdk-pool-mms-win-2019-general", + "CMAKE_GENERATOR": "Visual Studio 16 2019", + "PublishMapFiles": "true" + } + }, + "TargetPlatform": { + "UWP_debug": { + "CMAKE_SYSTEM_NAME": "WindowsStore", + "CMAKE_SYSTEM_VERSION": "10.0", + "CmakeArgs": " -DBUILD_TRANSPORT_WINHTTP=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", + "BuildArgs": "--parallel 8 --config Debug" + }, + "UWP_release": { + "CMAKE_SYSTEM_NAME": "WindowsStore", + "CMAKE_SYSTEM_VERSION": "10.0", + "CmakeArgs": " -DBUILD_TRANSPORT_WINHTTP=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", + "BuildArgs": "--parallel 8 --config Release" + } + }, + "TargetArchitecture": { + "x64": { + "CMAKE_GENERATOR_PLATFORM": "x64", + "VCPKG_DEFAULT_TRIPLET": "x64-uwp" + } + } + }, + { + "StaticConfigs": { + "Ubuntu18": { + "OSVmImage": "MMSUbuntu18.04", + "Pool": "azsdk-pool-mms-ubuntu-1804-general", + "VCPKG_DEFAULT_TRIPLET": "x64-linux", + "BuildArgs": "-j 10" + } + }, + "BuildSettings": { + "gpp-5": { + "AptDependencies": "g++-5", + "CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 " }, - { - "StaticConfigs": { - "Windows2019": { - "OSVmImage": "MMS2019", - "Pool": "azsdk-pool-mms-win-2019-general", - "CMAKE_GENERATOR": "Visual Studio 16 2019" - } - }, - "TargetPlatform": { - "Win32Api_curl": { - "CmakeArgs": " -DBUILD_TRANSPORT_CURL=ON" - }, - "Win32Api_release_curl": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON -DMSVC_USE_STATIC_CRT=ON", - "BuildArgs": "--parallel 8 --config Release", - "PublishMapFiles": "true" - }, - "Win32Api_debug_tests": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON -DBUILD_TRANSPORT_WINHTTP=ON -DMSVC_USE_STATIC_CRT=ON", - "BuildArgs": "--parallel 8 --config Debug", - "PublishMapFiles": "true" - } - }, - "TargetArchitecture": { - "x86": { - "CMAKE_GENERATOR_PLATFORM": "Win32", - "VCPKG_DEFAULT_TRIPLET": "x86-windows-static" - }, - "x64": { - "CMAKE_GENERATOR_PLATFORM": "x64", - "VCPKG_DEFAULT_TRIPLET": "x64-windows-static" - } - } + "gpp-8": { + "AptDependencies": "g++-8", + "CC": "/usr/bin/gcc-8", + "CXX": "/usr/bin/g++-8" }, - { - "StaticConfigs": { - "Windows2019": { - "VcpkgInstall": "openssl", - "OSVmImage": "MMS2019", - "Pool": "azsdk-pool-mms-win-2019-general", - "CMAKE_GENERATOR": "Visual Studio 16 2019", - "PublishMapFiles": "true" - } - }, - "TargetPlatform": { - "UWP_debug": { - "CMAKE_SYSTEM_NAME": "WindowsStore", - "CMAKE_SYSTEM_VERSION": "10.0", - "CmakeArgs": " -DBUILD_TRANSPORT_WINHTTP=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", - "BuildArgs": "--parallel 8 --config Debug" - }, - "UWP_release": { - "CMAKE_SYSTEM_NAME": "WindowsStore", - "CMAKE_SYSTEM_VERSION": "10.0", - "CmakeArgs": " -DBUILD_TRANSPORT_WINHTTP=ON -DDISABLE_AZURE_CORE_OPENTELEMETRY=ON ", - "BuildArgs": "--parallel 8 --config Release" - } - }, - "TargetArchitecture": { - "x64": { - "CMAKE_GENERATOR_PLATFORM": "x64", - "VCPKG_DEFAULT_TRIPLET": "x64-uwp" - } - } + "gpp-9": { + "AptDependencies": "g++-9", + "CC": "/usr/bin/gcc-9", + "CXX": "/usr/bin/g++-9" }, - { - "StaticConfigs": { - "Ubuntu18": { - "OSVmImage": "MMSUbuntu18.04", - "Pool": "azsdk-pool-mms-ubuntu-1804-general", - "VCPKG_DEFAULT_TRIPLET": "x64-linux", - "BuildArgs": "-j 10" - } - }, - "BuildSettings": { - "gpp-5": { - "AptDependencies": "g++-5", - "CmakeEnvArg": "CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5 " - }, - "gpp-8": { - "AptDependencies": "g++-8", - "CC": "/usr/bin/gcc-8", - "CXX": "/usr/bin/g++-8" - }, - "gpp-9": { - "AptDependencies": "g++-9", - "CC": "/usr/bin/gcc-9", - "CXX": "/usr/bin/g++-9" - }, - "included_coverage": { - "AptDependencies": "gcovr lcov", - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON -DCMAKE_VERBOSE_MAKEFILE=ON", - "CODE_COVERAGE_COLLECT_ONLY": "1", - "CODE_COVERAGE": "enabled", - "PublishMapFiles": "true" - }, - "included": {}, - "included_release": { - "CMAKE_BUILD_TYPE": "Release", - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON", - "PublishMapFiles": "true" - }, - "included_samples": { - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON ", - "PublishMapFiles": "true" - } - } + "included_coverage": { + "AptDependencies": "gcovr lcov", + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_CODE_COVERAGE=ON -DCMAKE_VERBOSE_MAKEFILE=ON", + "CODE_COVERAGE_COLLECT_ONLY": "1", + "CODE_COVERAGE": "enabled", + "PublishMapFiles": "true" + }, + "included": {}, + "included_release": { + "CMAKE_BUILD_TYPE": "Release", + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON", + "PublishMapFiles": "true" + }, + "included_samples": { + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON ", + "PublishMapFiles": "true" + } + } + }, + { + "StaticConfigs": { + "Ubuntu20": { + "OSVmImage": "MMSUbuntu20.04", + "Pool": "azsdk-pool-mms-ubuntu-2004-general", + "VCPKG_DEFAULT_TRIPLET": "x64-linux", + "BuildArgs": "-j 10", + "CC": "/usr/bin/clang-11", + "CXX": "/usr/bin/clang++-11", + "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON", + "PublishMapFiles": "true" + } + }, + "BuildSettings": { + "clang-11": { + "CHECK_CLANG_FORMAT": "1" }, - { - "StaticConfigs": { - "Ubuntu20": { - "OSVmImage": "MMSUbuntu20.04", - "Pool": "azsdk-pool-mms-ubuntu-2004-general", - "VCPKG_DEFAULT_TRIPLET": "x64-linux", - "BuildArgs": "-j 10", - "CC": "/usr/bin/clang-11", - "CXX": "/usr/bin/clang++-11", - "CmakeArgs": " -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON", - "PublishMapFiles": "true" - } - }, - "BuildSettings": { - "clang-11": { - "CHECK_CLANG_FORMAT": "1" - }, - "included_release": { - "CMAKE_BUILD_TYPE": "Release" - } - } + "included_release": { + "CMAKE_BUILD_TYPE": "Release" } - ] + } + } + ] } diff --git a/eng/scripts/Get-BinarySizes.ps1 b/eng/scripts/Get-BinarySizes.ps1 index d032123801..1cc164e4ee 100644 --- a/eng/scripts/Get-BinarySizes.ps1 +++ b/eng/scripts/Get-BinarySizes.ps1 @@ -41,13 +41,16 @@ function setEnvVar($key, $value) { } function getTargetOs { - if ($OsVMImage.StartsWith('macOS')) { + if ($OsVMImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { return $OsVMImage } if ($OsVMImage -eq "MMS2019") { return "win-2019" } + if ($OsVMImage -eq "windows-2022") { + return "win-2022" + } if ($OsVMImage -eq "MMSUbuntu18.04") { return "ubuntu-18.04" @@ -57,11 +60,11 @@ function getTargetOs { return "ubuntu-20.04" } - LogError "Could not infer target OS" + LogError "Could not infer target OS from " $OSVmImage } function getTargetArchitecture { - if ($OSVmImage.StartsWith('macOS')) { + if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { return "x64" } @@ -78,7 +81,7 @@ function getTargetArchitecture { } function getToolChain { - if ($OSVmImage.StartsWith('macOS')) { + if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { return "AppleClang 12" } @@ -86,6 +89,10 @@ function getToolChain { return "MSVC" } + if ($OSVmImage -eq "windows-2022") { + return "MSVC17" + } + if ($OSVmImage.Contains("Ubuntu")) { if ($CmakeEnvArg.Contains('g++-5')) { return 'g++-5' @@ -98,15 +105,15 @@ function getToolChain { } return "g++-7" } - LogError "Could not infer toolchain" + LogError "Could not infer toolchain from " $OSVmImage and $CmakeEnvArg } function getTargetPlatform { - if ($OSVmImage.StartsWith('macOS')) { + if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { return "macos" } - if ($OSVmImage -eq 'MMS2019') { + if ($OSVmImage -eq 'MMS2019' -or $OsVMImage -eq "windows-2022") { if (!$env:CMAKE_SYSTEM_NAME -and !$CmakeArgs.Contains('WindowsStore')) { return 'win32' } elseif ($env:CMAKE_SYSTEM_NAME -eq 'WindowsStore' -or $CmakeArgs.Contains('WindowsStore')) { @@ -118,7 +125,7 @@ function getTargetPlatform { return 'linux' } - LogError "Could not infer target platform" + LogError "Could not infer target platform from " $OSVmImage } function getBuildConfiguration { From f8c41df5a25ecb93e89e514c49e09709bab1267d Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Wed, 24 Aug 2022 15:22:05 -0700 Subject: [PATCH 37/37] Simpler get-binarysizes check for OSX (#3901) * Simpler get-binarysizes check for OSX * Missed wildcard --- eng/scripts/Get-BinarySizes.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/scripts/Get-BinarySizes.ps1 b/eng/scripts/Get-BinarySizes.ps1 index 1cc164e4ee..bbe5be472f 100644 --- a/eng/scripts/Get-BinarySizes.ps1 +++ b/eng/scripts/Get-BinarySizes.ps1 @@ -41,7 +41,7 @@ function setEnvVar($key, $value) { } function getTargetOs { - if ($OsVMImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OsVMImage -like 'macOS*') { return $OsVMImage } @@ -64,7 +64,7 @@ function getTargetOs { } function getTargetArchitecture { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS*') { return "x64" } @@ -81,7 +81,7 @@ function getTargetArchitecture { } function getToolChain { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS*') { return "AppleClang 12" } @@ -109,7 +109,7 @@ function getToolChain { } function getTargetPlatform { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS*') { return "macos" }