Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 6518 (#37706)
Browse files Browse the repository at this point in the history
* Bump test proxy version
* remove interim fix
* move proxy transition-scripts folder to onboarding

Co-authored-by: Bill Wert <billwert@microsoft.com>
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
  • Loading branch information
3 people authored Jul 28, 2023
1 parent 7acedfd commit e3661de
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
</ItemGroup>

<PropertyGroup>
<TestProxyVersion>1.0.0-dev.20230706.1</TestProxyVersion>
<TestProxyVersion>1.0.0-dev.20230728.1</TestProxyVersion>
</PropertyGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eng/common/testproxy/target_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-dev.20230706.1
1.0.0-dev.20230728.1
7 changes: 0 additions & 7 deletions sdk/core/Azure.Core.TestFramework/src/TestProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e3661de

Please sign in to comment.