Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
6fa5620
[Storage][DataMovement] Fix some failing live tests (#52551)
jalauzon-msft Sep 10, 2025
a662d3c
.NET SDK Network Release Version 2024-10-01
Sep 10, 2025
86d23e3
build: bump MTG version (#52562)
jorgerangel-msft Sep 10, 2025
3f8874c
Prepare HttpPipelineHelper to onbord customer sdk stats. (#52565)
rajkumar-rangaraj Sep 10, 2025
bbb5483
Initial release for Azure.ResourceManager.Resources.Bicep (#50751)
anthony-c-martin Sep 11, 2025
28634c9
Release ComputeSchedule .NET sdk for api-version 2025-05-01 (#52284)
NneOkeke Sep 11, 2025
17d0414
Remove internal setter from collection-type property (#52554)
live1206 Sep 11, 2025
a5c1d29
Update TypeSpec emitter version to prerelease 1.0.0-alpha.20250911.1 …
azure-sdk Sep 11, 2025
c888746
Increment package version after release of Azure.ResourceManager.Comp…
azure-sdk Sep 11, 2025
08e3d5e
Remove setter for safeflatten collection-type property and handle nul…
live1206 Sep 11, 2025
f6b4de8
add codeowner (#52570)
kevinzz6 Sep 11, 2025
cc9c182
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250911.1 (#52582)
azure-sdk Sep 11, 2025
6b200f6
[Storage] [DataMovement] Merge hotfix branch DMLib into main (#52586)
amnguye Sep 11, 2025
399089e
Add custom instructions to fetch TypeSpec docs (#52588)
azure-sdk Sep 11, 2025
8e1f393
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250911.3 (#52590)
azure-sdk Sep 11, 2025
5048599
Make Prepare-Release.ps1 executable (#52592)
azure-sdk Sep 12, 2025
cc25ac2
Synapse release Sep 2025 (#52389)
kevinzz6 Sep 12, 2025
47c3b0b
Add setter for collection-type property during safe flatten to avoid …
live1206 Sep 12, 2025
76feea1
Update TypeSpec emitter version to prerelease 1.0.0-alpha.20250911.3 …
azure-sdk Sep 12, 2025
f82e269
Increment package version after release of Azure.Analytics.Synapse.Ar…
azure-sdk Sep 12, 2025
f9ba85d
Release Azure.ResourceManager.ComputeSchedule 1.2.0-beta.1 (#52600)
ArthurMa1978 Sep 12, 2025
48b9ea2
Increment package version after release of Azure.ResourceManager.Comp…
azure-sdk Sep 12, 2025
c22f53c
Update documentation for AuthorizationCodeCredential (#52605)
austrheim Sep 12, 2025
ab0504a
scope resource support. (#52598)
haiyuazhang Sep 12, 2025
d0fab99
Regenerate repository SDK with TypeSpec build 20250911.2 (#52576)
azure-sdk Sep 12, 2025
7dc4bfc
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250912.1 (#52609)
azure-sdk Sep 12, 2025
6e2a7fc
[Microsoft.ClientModel.TestFramework] Update test-proxy tool logic (#…
m-redding Sep 12, 2025
7c4109e
feat: bump keyvault admin spec (#52581)
jorgerangel-msft Sep 12, 2025
ef1510a
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250912.2 (#52610)
azure-sdk Sep 12, 2025
588dd67
Fix tenantId selection in MSAL (#52613)
christothes Sep 12, 2025
7b95361
Add comprehensive samples for missing Azure.OpenAI APIs (#52137)
Copilot Sep 12, 2025
e2d0b20
Update TypeSpec emitter version to prerelease 1.0.0-alpha.20250912.2 …
azure-sdk Sep 13, 2025
d1d71e0
Optimize the Telemetry test for C# (#52615)
nick863 Sep 13, 2025
600a4c1
[Microsoft.ContainerInstance] Rectify latest preview API version (#52…
drishtipeshwani09 Sep 15, 2025
68265c7
Support "tuple resource" in new management generator (#52537)
haiyuazhang Sep 15, 2025
ca6e724
Specified build command in the configuration for .NET (#52546)
raych1 Sep 15, 2025
390a4c4
Add Debug to list of parameters copied for SearchOptions. (#52629)
davo7135 Sep 15, 2025
d0eb905
Sync eng/common directory with azure-sdk-tools for PR 11931 (#52630)
azure-sdk Sep 15, 2025
fd4b2d1
Revert "Specified build command in the configuration for .NET (#52546…
raych1 Sep 15, 2025
05a765c
Change LogProb data type (#52523)
rhurey Sep 15, 2025
c4c6acc
Regenerate repository SDK with TypeSpec build 20250915.1 (#52627)
azure-sdk Sep 16, 2025
42439ef
Autogenerate KeyVault API for 2025-05-01 (#52611)
ksemenov-gh Sep 16, 2025
b9c515e
[AutoPR Azure.ResourceManager.ComputeRecommender]-generated-from-SDK …
azure-sdk Sep 16, 2025
e521c48
[AutoPR Azure.ResourceManager.DisconnectedOperations]-generated-from-…
azure-sdk Sep 16, 2025
5859155
Update Generator Version 3.0.0-beta.20250916.1 (#52642)
ArcturusZhang Sep 16, 2025
499f744
WorkloadOrchestration Initial SDK Release (#50571)
atharvau Sep 16, 2025
f0dd807
[Storage] [DataMovement] Changelogs for 12.3.0-beta.1 Release (#52646)
nickliu-msft Sep 16, 2025
4067f86
Add support for @azure-typespec/http-client-csharp emitter in Generat…
Copilot Sep 16, 2025
af5cfc4
Include diagnostics when trace is enabled (#52647)
JoshLove-msft Sep 16, 2025
9d5f65d
[Microsoft.ClientModel.TestFramework] Add support for non-generic col…
m-redding Sep 16, 2025
300bd78
Increment version for storage releases (#52648)
azure-sdk Sep 16, 2025
dad4b3d
Update changelog (#52649)
rhurey Sep 16, 2025
39c5699
(playwrighttesting): Removed sorce code for both CP and DP sdk for pl…
kashish2508 Sep 16, 2025
147e903
Promote ACS Email SDK to stable version 2025-09-01 (#52654)
ddouglas-msft Sep 17, 2025
6436e9d
Fix Message blocks serialization. (#52653)
nick863 Sep 17, 2025
bc48cf5
Increment package version after release of Azure.ResourceManager.Work…
azure-sdk Sep 17, 2025
3ce678d
Increment package version after release of Azure.ResourceManager.Cont…
azure-sdk Sep 17, 2025
a8359d3
Prepare AOT-safe release for Azure.ResourceManager.SignalR (#52643)
ArthurMa1978 Sep 17, 2025
217a0b0
Update core JS dependencies for Azure Management Generator (#52639)
Copilot Sep 17, 2025
e330fff
[AutoPR Azure.ResourceManager.StorageMover]-generated-from-SDK Genera…
azure-sdk Sep 17, 2025
8e86f0b
fix ci in computerecommender (#52659)
ArcturusZhang Sep 17, 2025
022ae3c
Update commitId for flatten decorator legacy namespace move (#52640)
welovej Sep 17, 2025
bea740e
fix issue in populate rest operation arguments. (#52663)
haiyuazhang Sep 17, 2025
89ca810
Regenerate repository SDK with TypeSpec build 20250916.1 (#52662)
ArcturusZhang Sep 17, 2025
f1f4e11
update (#52665)
ArthurMa1978 Sep 17, 2025
cebf933
ci(mgmt): remove unused per-package path list from sdk/resourcemanage…
ArthurMa1978 Sep 17, 2025
f09e243
Roll back the release setup for Azure.ResourceManager.StorageMover. (…
ArthurMa1978 Sep 17, 2025
b49d59f
change request path ancestor relationship detection logic. (#52669)
haiyuazhang Sep 17, 2025
e322024
Increment package version after release of Azure.AI.VoiceLive (#52657)
azure-sdk Sep 17, 2025
86f8803
Increment package version after release of Azure.ResourceManager.IotF…
azure-sdk Sep 17, 2025
6e48c23
[Storage][DataMovement] Fix some more flakey Live tests (#52584)
nickliu-msft Sep 17, 2025
12e3f5b
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250917.1 (#52673)
azure-sdk Sep 17, 2025
f100474
Add link to customization docs (#52686)
JoshLove-msft Sep 17, 2025
6fe19ec
Add confirmation before sdk generation (#52685)
azure-sdk Sep 17, 2025
a6688f4
Update commit (#52690)
JoshLove-msft Sep 18, 2025
adcf2b0
update commit and directory (#52693)
ArcturusZhang Sep 18, 2025
dce958b
Regenerate repository SDK with TypeSpec build 20250917.2 (#52692)
ArcturusZhang Sep 18, 2025
deb2a0c
Fix namespace for `Azure.ResourceManager.Compute.Recommender` (#52696)
ArcturusZhang Sep 18, 2025
c2bf433
[Conv runtime] remove conersationai 20250515preview (#52651)
amber-Chen-86 Sep 18, 2025
ce32f4a
Remove Azure AD reference from Identity README (#52698)
scottaddie Sep 18, 2025
36d0a86
[Storage] Add system-assigned managed identity support to Blob perf t…
jalauzon-msft Sep 18, 2025
568c749
Sync eng/common directory with azure-sdk-tools repository (#52702)
azure-sdk Sep 18, 2025
c7ecdbb
Sync eng/common directory with azure-sdk-tools for PR 11968 (#52704)
azure-sdk Sep 18, 2025
74964ae
Update UnbrandedGeneratorVersion to 1.0.0-alpha.20250918.1 (#52708)
azure-sdk Sep 18, 2025
82bc1c4
[Microsoft.ClientModel.TestFramework] Remove some flaky tests that ar…
m-redding Sep 18, 2025
217b03b
Specified build command in the configuration for .NET again
raych1 Sep 18, 2025
b966cb0
Prepare for the release (#52715)
nick863 Sep 18, 2025
cb88a7d
Sync eng/common directory with azure-sdk-tools for PR 11868 (#52707)
azure-sdk Sep 18, 2025
c01c83d
Update commit IDs to reference specs with emitter-output-dir (#52699)
JoshLove-msft Sep 18, 2025
441584e
Increment package version after release of Azure.AI.Agents.Persistent…
azure-sdk Sep 18, 2025
2721849
Increment package version after release of Azure.AI.Language.Conversa…
azure-sdk Sep 18, 2025
4abc4c8
Sync eng/common directory with azure-sdk-tools for PR 12060 (#52711)
azure-sdk Sep 19, 2025
1c1194b
Merge branch 'main' into kamboj-prjwl/release-network-2024-10-01
ArthurMa1978 Sep 19, 2025
6c3b294
update
ArthurMa1978 Sep 19, 2025
b8f548a
update
ArthurMa1978 Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Microsoft.ClientModel.TestFramework] Update test-proxy tool logic (#…
…52589)

* update test proxy tool location

* Update sdk/core/Microsoft.ClientModel.TestFramework/src/RecordedTests/TestProxy/TestProxyProcess.cs

Co-authored-by: Copilot <[email protected]>

* fix

---------

Co-authored-by: Copilot <[email protected]>
  • Loading branch information
m-redding and Copilot authored Sep 12, 2025
commit 6e2a7fcfcdaf9cd3c44b1fa712bd384c74e7f7ed
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,4 @@
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)/../../System.ClientModel/src/Internal/ContentTypeUtilities.cs" LinkBase="Shared\Core" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>TestProxyPath</_Parameter1>
<_Parameter2>$(NuGetPackageRoot)\azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net8.0\any\Azure.Sdk.Tools.TestProxy.dll</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ namespace Microsoft.ClientModel.TestFramework;
public class TestProxyProcess
{
private static readonly string s_dotNetExe;
private readonly int? _proxyPortHttp;
private readonly int? _proxyPortHttps;
private readonly Process? _testProxyProcess;
private readonly StringBuilder _errorBuffer = new();
private static readonly object _lock = new();
private static TestProxyProcess? _shared;
private readonly StringBuilder _output = new();
private static readonly bool s_enableDebugProxyLogging;

internal virtual TestProxyAdminClient AdminClient { get; }
internal virtual TestProxyClient ProxyClient { get; }

/// <summary>
/// The IP address used for the test proxy. Uses 127.0.0.1 instead of localhost to avoid SSL callback slowness.
Expand All @@ -39,26 +50,6 @@ public class TestProxyProcess
/// </summary>
public int? ProxyPortHttps => _proxyPortHttps;

private readonly int? _proxyPortHttp;
private readonly int? _proxyPortHttps;
private readonly Process? _testProxyProcess;

/// <summary>
/// Gets the test framework client for interacting with the test proxy.
/// </summary>
internal virtual TestProxyAdminClient AdminClient { get; }

/// <summary>
/// Gets the test proxy client for proxy-specific operations.
/// </summary>
internal virtual TestProxyClient ProxyClient { get; }

private readonly StringBuilder _errorBuffer = new();
private static readonly object _lock = new();
private static TestProxyProcess? _shared;
private readonly StringBuilder _output = new();
private static readonly bool s_enableDebugProxyLogging;

/// <summary>
/// Initializes static members of the <see cref="TestProxyProcess"/> class.
/// Locates the .NET executable and configures debug logging settings.
Expand Down Expand Up @@ -102,24 +93,35 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false)

debugMode |= environmentDebugMode;

ProcessStartInfo testProxyProcessInfo = new ProcessStartInfo(
s_dotNetExe,
$"\"{proxyPath}\" start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\"")
ProcessStartInfo testProxyProcessInfo;

if (proxyPath is not null)
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
EnvironmentVariables =
{
["ASPNETCORE_URLS"] = $"http://{IpAddress}:0;https://{IpAddress}:0",
["Logging__LogLevel__Azure.Sdk.Tools.TestProxy"] = s_enableDebugProxyLogging ? "Debug" : "Error",
["Logging__LogLevel__Default"] = "Error",
["Logging__LogLevel__Microsoft.AspNetCore"] = s_enableDebugProxyLogging ? "Information" : "Error",
["Logging__LogLevel__Microsoft.Hosting.Lifetime"] = "Information",
["ASPNETCORE_Kestrel__Certificates__Default__Path"] = TestEnvironment.DevCertPath,
["ASPNETCORE_Kestrel__Certificates__Default__Password"] = TestEnvironment.DevCertPassword
}
};
testProxyProcessInfo = new ProcessStartInfo(
s_dotNetExe,
$"\"{proxyPath}\" start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\"");
}
else
{
TryRestoreLocalTools();

testProxyProcessInfo = new ProcessStartInfo(
s_dotNetExe,
$"tool run test-proxy start -u --storage-location=\"{TestEnvironment.RepositoryRoot}\"");
}

testProxyProcessInfo.UseShellExecute = false;
testProxyProcessInfo.RedirectStandardOutput = true;
testProxyProcessInfo.RedirectStandardError = true;

// Set environment variables
testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_URLS"] = $"http://{IpAddress}:0;https://{IpAddress}:0";
testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Azure.Sdk.Tools.TestProxy"] = s_enableDebugProxyLogging ? "Debug" : "Error";
testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Default"] = "Error";
testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Microsoft.AspNetCore"] = s_enableDebugProxyLogging ? "Information" : "Error";
testProxyProcessInfo.EnvironmentVariables["Logging__LogLevel__Microsoft.Hosting.Lifetime"] = "Information";
testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_Kestrel__Certificates__Default__Path"] = TestEnvironment.DevCertPath;
testProxyProcessInfo.EnvironmentVariables["ASPNETCORE_Kestrel__Certificates__Default__Password"] = TestEnvironment.DevCertPassword;

_testProxyProcess = Process.Start(testProxyProcessInfo);

Expand Down Expand Up @@ -168,7 +170,13 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false)

if (_proxyPortHttp == null || _proxyPortHttps == null)
{
CheckForErrors();
if (_errorBuffer.Length > 0)
{
var error = _errorBuffer.ToString();
_errorBuffer.Clear();
throw new InvalidOperationException($"An error occurred in the test proxy: {error}");
}

// if no errors, fallback to this exception
throw new InvalidOperationException("Failed to start the test proxy. One or both of the ports was not populated." + Environment.NewLine +
$"http: {_proxyPortHttp}" + Environment.NewLine +
Expand All @@ -192,6 +200,69 @@ private TestProxyProcess(string? proxyPath, bool debugMode = false)
});
}

private static bool TryParsePort(string? output, string scheme, out int? port)
{
if (output == null)
{
TestContext.Progress.WriteLine("output was null");
port = null;
return false;
}
string nowListeningOn = "Now listening on: ";
int nowListeningOnLength = nowListeningOn.Length;
var index = output.IndexOf($"{nowListeningOn}{scheme}:", StringComparison.CurrentCultureIgnoreCase);
if (index > -1)
{
var start = index + nowListeningOnLength;
var uri = output.Substring(start, output.Length - start).Trim();
port = new Uri(uri).Port;
return true;
}

port = null;
return false;
}

private static void TryRestoreLocalTools()
{
try
{
var currentDir = Directory.GetCurrentDirectory();
while (currentDir != null)
{
var toolsJsonPath = Path.Combine(currentDir, ".config", "dotnet-tools.json");
if (File.Exists(toolsJsonPath))
{
// Found a tools manifest, try to restore
var processInfo = new ProcessStartInfo
{
FileName = s_dotNetExe,
Arguments = "tool restore",
WorkingDirectory = currentDir,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true
};

using var process = Process.Start(processInfo);
if (process != null)
{
process.WaitForExit(30000);
}
break;
}

var parentDir = Directory.GetParent(currentDir);
currentDir = parentDir?.FullName;
}
}
catch
{
// If restore fails, silently continue - the dotnet test-proxy command will handle it
}
}

/// <summary>
/// Starts the test proxy
/// </summary>
Expand All @@ -209,12 +280,8 @@ public static TestProxyProcess Start(bool debugMode = false)
var shared = _shared;
if (shared == null)
{
shared = new TestProxyProcess(typeof(TestProxyProcess)
.Assembly
.GetCustomAttributes<AssemblyMetadataAttribute>()
.Single(a => a.Key == "TestProxyPath")
.Value,
debugMode);
var proxyPath = GetTestProxyPath();
shared = new TestProxyProcess(proxyPath, debugMode);

AppDomain.CurrentDomain.DomainUnload += (_, _) =>
{
Expand All @@ -228,34 +295,16 @@ public static TestProxyProcess Start(bool debugMode = false)
}
}

/// <summary>
/// Attempts to parse a port number from test proxy output for the specified scheme.
/// </summary>
/// <param name="output">The output line from the test proxy.</param>
/// <param name="scheme">The URI scheme (http or https) to parse.</param>
/// <param name="port">When this method returns, contains the parsed port number if successful; otherwise, null.</param>
/// <returns>true if the port was successfully parsed; otherwise, false.</returns>
private static bool TryParsePort(string? output, string scheme, out int? port)
private static string? GetTestProxyPath()
{
if (output == null)
{
TestContext.Progress.WriteLine("output was null");
port = null;
return false;
}
string nowListeningOn = "Now listening on: ";
int nowListeningOnLength = nowListeningOn.Length;
var index = output.IndexOf($"{nowListeningOn}{scheme}:", StringComparison.CurrentCultureIgnoreCase);
if (index > -1)
// Look for environment variable override
var envPath = Environment.GetEnvironmentVariable("TEST_PROXY_EXE_PATH");
if (!string.IsNullOrEmpty(envPath))
{
var start = index + nowListeningOnLength;
var uri = output.Substring(start, output.Length - start).Trim();
port = new Uri(uri).Port;
return true;
return envPath;
}

port = null;
return false;
return null;
}

/// <summary>
Expand All @@ -278,15 +327,6 @@ public virtual async Task CheckProxyOutputAsync()
}
}

CheckForErrors();
}

/// <summary>
/// Checks for any errors in the error buffer and throws an exception if errors are found.
/// </summary>
/// <exception cref="InvalidOperationException">Thrown when errors are found in the test proxy.</exception>
private void CheckForErrors()
{
if (_errorBuffer.Length > 0)
{
var error = _errorBuffer.ToString();
Expand Down
Loading