Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4299650
Fix typo
AArnott Jul 7, 2026
90ac1ee
Use preferred pattern for appending to PATH in GitHub Actions
AArnott Jul 7, 2026
6320f43
Merge pull request #535 from AArnott/update-path-handling
AArnott Jul 7, 2026
e1c8aa4
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Jul 7, 2026
5a0a13f
Avoid loading GitHubActions.ps1 on Azure Pipelines
AArnott Jul 7, 2026
def42bc
Merge branch 'main' into microbuild
AArnott Jul 7, 2026
097060a
Validate Path parameter in Add-GitHubActionsEnvVariable
AArnott Jul 7, 2026
b182ee0
Merge branch 'main' into microbuild
AArnott Jul 7, 2026
5cd226a
Fix 1ES PT nuget push
AArnott Jul 8, 2026
b5153f6
Update dependency dotnet-coverage to v18.9.0 (536)
renovate[bot] Jul 8, 2026
42c5cea
Update dependency Microsoft.Testing.Extensions.CodeCoverage to 18.9.0…
renovate[bot] Jul 8, 2026
3749d32
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Jul 8, 2026
003d56a
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Jul 8, 2026
e6e3c19
Revert "Update dependency dotnet-coverage to v18.9.0 (536)"
AArnott Jul 8, 2026
1cc268f
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Jul 8, 2026
c43fba6
Prevent empty paths from being added to the PATH
AArnott Jul 8, 2026
65a9b52
Merge branch 'main' into microbuild
AArnott Jul 8, 2026
db198c0
Fix package restore failures
AArnott Jul 8, 2026
a8e7acf
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Jul 8, 2026
a4d4554
Fix up error messages
AArnott Jul 8, 2026
8201f77
Avoid importing GitHubActions.ps1 outside GitHub Actions
AArnott Jul 8, 2026
6ab1b59
Merge branch 'main' into microbuild
AArnott Jul 8, 2026
3ee5eeb
Clarify yml comment
AArnott Jul 8, 2026
3948cdc
Update script synopsis
AArnott Jul 8, 2026
bd12df8
Merge branch 'main' into microbuild
AArnott Jul 8, 2026
18c664b
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Jul 8, 2026
041e8f8
Fix failing analyzer tests
AArnott Jul 8, 2026
ccc6653
Bring back some fault tolerance
AArnott Jul 8, 2026
81f9d13
Stabilize `InvokeWithCancellationAsync_TimeoutAndDisconnectDuringSend…
AArnott Jul 8, 2026
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
2 changes: 1 addition & 1 deletion .github/skills/bundle-dependency-prs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Before aggregating PRs, first try to fix any individual dependency update PRs wi

1. For the dependency PRs with failing build or test PR checks, check out their source branch and fix any issues.
2. Push your fixes as fresh commits to the individual dependency PRs.
If pushing to a repo in the `microsoft` org when the PR is authord by `renovate`, follow-up the push with a PR comment that says exactly this: "/azp run" which triggers PR checks to re-run.
If pushing to a repo in the `microsoft` org when the PR is authored by `renovate`, follow-up the push with a PR comment that says exactly this: "/azp run" which triggers PR checks to re-run.
3. If you can't fix a particular PR, add a comment to the PR describing your attempt and outcome.

## Group dependency PRs that are ready to go
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageVersion Include="MessagePackAnalyzer" Version="$(MessagePackVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="2.3.11" />
<PackageVersion Include="Microsoft.AspNetCore" Version="2.3.11" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.1" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.8" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="$(RoslynVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(RoslynVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynVersion)" />
Expand All @@ -40,7 +40,7 @@
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.6" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.1" />
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
<PackageVersion Include="System.ValueTuple" Version="4.6.2" />
<PackageVersion Include="xunit.combinatorial" Version="2.0.24" />
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
<PackageVersion Include="xunit.stafact" Version="3.0.13" />
Expand All @@ -54,7 +54,7 @@
<PackageVersion Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(RoslynVersionForAnalyzers)" />
</ItemGroup>
<ItemGroup Label="Library.Template">
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.8.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.9.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.Telemetry" Version="$(MicrosoftTestingPlatformVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/prepare-insertion-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ stages:
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals 1ESPT-Ubuntu24.04
- ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade this job to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary
Comment thread
AArnott marked this conversation as resolved.
Comment thread
AArnott marked this conversation as resolved.
os: Linux
Comment thread
AArnott marked this conversation as resolved.
templateContext:
outputs:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extends:
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals 1ESPT-Ubuntu24.04
- ImageOverride -equals 1ESPT-Ubuntu22.04 # Do NOT upgrade this job to Ubuntu24 until this is fixed: https://portal.microsofticm.com/imp/v5/incidents/details/830879871/summary
Comment thread
AArnott marked this conversation as resolved.
Comment thread
AArnott marked this conversation as resolved.
os: Linux
Comment thread
AArnott marked this conversation as resolved.
templateContext:
outputs:
Expand Down
9 changes: 9 additions & 0 deletions samples/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />

<ItemGroup>
<PackageVersion Update="System.IO.Pipelines" Version="10.0.8" />
<PackageVersion Update="System.Text.Json" Version="10.0.8" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions src/StreamJsonRpc/JsonRpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,10 @@ private JsonRpcError CreateCancellationResponse(JsonRpcRequest request)
{
throw new TimeoutException(Resources.FormatOutboundInvocationTimedOut(nameof(this.OutboundRequestTimeout)), ex);
}
catch (ConnectionLostException ex) when (timeoutCancellationSource?.IsCancellationRequested is true && !cancellationToken.IsCancellationRequested)
{
throw new TimeoutException(Resources.FormatOutboundInvocationTimedOut(nameof(this.OutboundRequestTimeout)), ex);
}
catch (OperationCanceledException ex) when (this.DisconnectedToken.IsCancellationRequested && !effectiveOutboundCancellationToken.IsCancellationRequested)
{
throw new ConnectionLostException(Resources.ConnectionDropped, ex);
Expand Down
3 changes: 2 additions & 1 deletion test/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

<ItemGroup>
<PackageVersion Update="System.Collections.Immutable" Version="9.0.0" />
<PackageVersion Update="System.IO.Pipelines" Version="9.0.0" />
<PackageVersion Update="System.IO.Pipelines" Version="10.0.8" />
<PackageVersion Update="System.Reflection.Metadata" Version="9.0.0" />
<PackageVersion Update="System.Text.Json" Version="10.0.8" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal static class ReferencesHelper
.AddPackages([
new PackageIdentity("System.Memory", "4.6.3"),
new PackageIdentity("System.Threading.Tasks.Extensions", "4.6.1"),
new PackageIdentity("Microsoft.Bcl.AsyncInterfaces", "10.0.1"),
new PackageIdentity("Microsoft.Bcl.AsyncInterfaces", "10.0.8"),
]);
#endif

Expand Down
8 changes: 8 additions & 0 deletions test/StreamJsonRpc.Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ protected TestBase(ITestOutputHelper logger)

protected static CancellationToken UnexpectedTimeoutToken => new CancellationTokenSource(UnexpectedTimeout).Token;

protected static bool IsTestRunOnAzurePipelines => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_DEFINITIONID"));

protected ITestOutputHelper Logger { get; }

protected CancellationToken TimeoutToken => Debugger.IsAttached ? CancellationToken.None : this.timeoutTokenSource.Token;
Expand All @@ -61,6 +63,12 @@ protected static void AssertCollectedObject(WeakReference weakReference)
GC.Collect();
GC.WaitForPendingFinalizers();

// For some reason the assertion tends to be sketchy when running on Azure Pipelines.
if (IsTestRunOnAzurePipelines)
{
Assert.SkipWhen(weakReference.IsAlive, "Weak reference is still alive.");
}

Assert.False(weakReference.IsAlive);
Comment thread
AArnott marked this conversation as resolved.
}
Comment thread
AArnott marked this conversation as resolved.

Expand Down
25 changes: 24 additions & 1 deletion tools/GitHubActions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,34 @@ function Add-GitHubActionsEnvVariable {
[string]$Value
)

if ([string]::IsNullOrWhiteSpace($Path)) {
throw "GitHub Actions environment file path must not be empty."
}

if ([string]::IsNullOrWhiteSpace($Name)) {
throw "GitHub Actions environment variable names must not be empty."
throw "GitHub Actions environment variable name must not be empty."
}

$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
$delimiter = [guid]::NewGuid().ToString('N')
[System.IO.File]::AppendAllText($Path, "$Name<<$delimiter`n$Value`n$delimiter`n", $utf8NoBom)
}

function Add-GitHubActionsPath {
param(
[string]$Path = $env:GITHUB_PATH,
[Parameter(Mandatory = $true)]
[string]$Value
)

if ([string]::IsNullOrWhiteSpace($Path)) {
throw "GitHub Actions path file path must not be empty."
Comment thread
AArnott marked this conversation as resolved.
}

if ([string]::IsNullOrWhiteSpace($Value)) {
throw "GitHub Actions path entry must not be empty."
}

$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
[System.IO.File]::AppendAllText($Path, "$Value`n", $utf8NoBom)
}
6 changes: 4 additions & 2 deletions tools/Set-EnvVars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Param(
[string[]]$PrependPath
)

. "$PSScriptRoot\GitHubActions.ps1"
if ($env:GITHUB_ACTIONS) {
. "$PSScriptRoot\GitHubActions.ps1"
}

if ($Variables.Count -eq 0) {
return $true
Expand Down Expand Up @@ -82,7 +84,7 @@ if ($PrependPath) {
Write-Host "##vso[task.prependpath]$_"
}
if ($env:GITHUB_ACTIONS) {
Add-GitHubActionsEnvVariable -Name PATH -Value $newPathValue
Add-GitHubActionsPath -Value $_
}
Comment thread
AArnott marked this conversation as resolved.

$CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%"
Expand Down
6 changes: 4 additions & 2 deletions tools/variables/_define.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#
.SYNOPSIS
This script translates the variables returned by the _all.ps1 script
into commands that instruct Azure Pipelines to actually set those variables for other pipeline tasks to consume.
into commands that instruct Azure Pipelines or GitHub Actions to actually set those variables for other pipeline tasks to consume.

The build or release definition may have set these variables to override
what the build would do. So only set them if they have not already been set.
Expand All @@ -11,7 +11,9 @@
param (
)

. "$PSScriptRoot\..\GitHubActions.ps1"
if ($env:GITHUB_ACTIONS) {
. "$PSScriptRoot\..\GitHubActions.ps1"
}

(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% {
# Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive.
Expand Down
Loading