From 01459acfae6577204bcddf37afc0b7ba23f5b329 Mon Sep 17 00:00:00 2001 From: Bill Wert Date: Fri, 14 Jul 2023 13:02:22 -0700 Subject: [PATCH 1/4] Bump test proxy version --- 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 6b3a646afd839..2030d0a2b200e 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20230706.1 +1.0.0-dev.20230714.2 From 09896bf5684e3d9fa71cb587f66d3fe1a5e345ab Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Tue, 25 Jul 2023 17:14:31 -0700 Subject: [PATCH 2/4] bump the proxy version to one that includes the base64 encoded header --- 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 2030d0a2b200e..29b6ba9ec8224 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20230714.2 +1.0.0-dev.20230721.1 From b1f34a1ba4d70e49f7032f7557edacbcd8666f34 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Fri, 28 Jul 2023 13:10:47 -0700 Subject: [PATCH 3/4] breadcrumb file doesn't exist anymore, but we can use an existing proxy feature to get the same performance --- .../README.md => onboarding/README.me} | 0 .../generate-assets-json.ps1 | 13 ++++++------- eng/common/testproxy/target_version.txt | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) rename eng/common/testproxy/{transition-scripts/README.md => onboarding/README.me} (100%) rename eng/common/testproxy/{transition-scripts => onboarding}/generate-assets-json.ps1 (97%) diff --git a/eng/common/testproxy/transition-scripts/README.md b/eng/common/testproxy/onboarding/README.me similarity index 100% rename from eng/common/testproxy/transition-scripts/README.md rename to eng/common/testproxy/onboarding/README.me diff --git a/eng/common/testproxy/transition-scripts/generate-assets-json.ps1 b/eng/common/testproxy/onboarding/generate-assets-json.ps1 similarity index 97% rename from eng/common/testproxy/transition-scripts/generate-assets-json.ps1 rename to eng/common/testproxy/onboarding/generate-assets-json.ps1 index 7ecd8408af016..3011a19e57aa0 100644 --- a/eng/common/testproxy/transition-scripts/generate-assets-json.ps1 +++ b/eng/common/testproxy/onboarding/generate-assets-json.ps1 @@ -308,18 +308,17 @@ Function Invoke-ProxyCommand { # Get the shorthash directory under PROXY_ASSETS_FOLDER Function Get-AssetsRoot { param( - [string] $AssetsJsonFile + [string] $AssetsJsonFile, + [string] $TestProxyExe ) $repoRoot = Get-Repo-Root $relPath = [IO.Path]::GetRelativePath($repoRoot, $AssetsJsonFile).Replace("`\", "/") $assetsJsonDirectory = Split-Path $relPath - $breadcrumbFile = Join-Path $repoRoot ".assets" ".breadcrumb" - $breadcrumbString = Get-Content $breadcrumbFile | Where-Object { $_.StartsWith($relPath) } - $assetRepo = $breadcrumbString.Split(";")[1] - $assetsPrefix = (Get-Content $AssetsJsonFile | Out-String | ConvertFrom-Json).AssetsRepoPrefixPath + [array] $output = & "$TestProxyExe" config locate -a "$relPath" --storage-location="$repoRoot" + $assetsDirectory = $output[-1] - return Join-Path $repoRoot ".assets" $assetRepo $assetsPrefix $assetsJsonDirectory + return Join-Path $assetsDirectory $assetsJsonDirectory } Function Move-AssetsFromLangRepo { @@ -405,7 +404,7 @@ if ($InitialPush) { $CommandArgs = "restore --assets-json-path $assetsJsonRelPath" Invoke-ProxyCommand -TestProxyExe $TestProxyExe -CommandArgs $CommandArgs -TargetDirectory $repoRoot - $assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile) + $assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile -TestProxyExe $TestProxyExe) Write-Host "assetsRoot=$assetsRoot" Move-AssetsFromLangRepo -AssetsRoot $assetsRoot diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt index 29b6ba9ec8224..faaab72a41d3d 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20230721.1 +1.0.0-dev.20230728.1 From 3f00c2ced93be391ec2fba02cf9c96d181e5088c Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Fri, 28 Jul 2023 14:18:13 -0700 Subject: [PATCH 4/4] remove interim fix, update proxy version to one that can't stomp on itself --- eng/Packages.Data.props | 2 +- sdk/core/Azure.Core.TestFramework/src/TestProxy.cs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 9bde37e0b7a2e..9f8df1bcaaa5f 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -301,7 +301,7 @@ - 1.0.0-dev.20230706.1 + 1.0.0-dev.20230728.1 diff --git a/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs b/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs index 72d77b9cc1899..4521342d35613 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs @@ -81,13 +81,6 @@ private TestProxy(string proxyPath, bool debugMode = false) } }; - bool.TryParse(Environment.GetEnvironmentVariable("TF_BUILD"), out bool inCI); - - if (inCI) - { - testProxyProcessInfo.EnvironmentVariables["PROXY_ASSETS_FOLDER"] = Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString()); - } - _testProxyProcess = Process.Start(testProxyProcessInfo); ProcessTracker.Add(_testProxyProcess);