Skip to content

Commit b2e7fad

Browse files
authored
Merge pull request #1480 from microsoft/dev/andarno/libtemplateUpdate
Merge latest Library.Template
2 parents 1fd9c69 + 81f9d13 commit b2e7fad

12 files changed

Lines changed: 62 additions & 13 deletions

File tree

.github/skills/bundle-dependency-prs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Before aggregating PRs, first try to fix any individual dependency update PRs wi
2727

2828
1. For the dependency PRs with failing build or test PR checks, check out their source branch and fix any issues.
2929
2. Push your fixes as fresh commits to the individual dependency PRs.
30-
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.
30+
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.
3131
3. If you can't fix a particular PR, add a comment to the PR describing your attempt and outcome.
3232

3333
## Group dependency PRs that are ready to go

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PackageVersion Include="MessagePackAnalyzer" Version="$(MessagePackVersion)" />
1919
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="2.3.11" />
2020
<PackageVersion Include="Microsoft.AspNetCore" Version="2.3.11" />
21-
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.1" />
21+
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.8" />
2222
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="$(RoslynVersion)" />
2323
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(RoslynVersion)" />
2424
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynVersion)" />
@@ -40,7 +40,7 @@
4040
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.1" />
4141
<PackageVersion Include="System.Text.Json" Version="8.0.6" />
4242
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.1" />
43-
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
43+
<PackageVersion Include="System.ValueTuple" Version="4.6.2" />
4444
<PackageVersion Include="xunit.combinatorial" Version="2.0.24" />
4545
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
4646
<PackageVersion Include="xunit.stafact" Version="3.0.13" />
@@ -54,7 +54,7 @@
5454
<PackageVersion Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(RoslynVersionForAnalyzers)" />
5555
</ItemGroup>
5656
<ItemGroup Label="Library.Template">
57-
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.8.0" />
57+
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.9.0" />
5858
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
5959
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
6060
<PackageVersion Include="Microsoft.Testing.Extensions.Telemetry" Version="$(MicrosoftTestingPlatformVersion)" />

azure-pipelines/prepare-insertion-stages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ stages:
5151
pool:
5252
name: AzurePipelines-EO
5353
demands:
54-
- ImageOverride -equals 1ESPT-Ubuntu24.04
54+
- 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
5555
os: Linux
5656
templateContext:
5757
outputs:

azure-pipelines/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extends:
3333
pool:
3434
name: AzurePipelines-EO
3535
demands:
36-
- ImageOverride -equals 1ESPT-Ubuntu24.04
36+
- 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
3737
os: Linux
3838
templateContext:
3939
outputs:

samples/Directory.Packages.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
4+
5+
<ItemGroup>
6+
<PackageVersion Update="System.IO.Pipelines" Version="10.0.8" />
7+
<PackageVersion Update="System.Text.Json" Version="10.0.8" />
8+
</ItemGroup>
9+
</Project>

src/StreamJsonRpc/JsonRpc.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,6 +2341,10 @@ private JsonRpcError CreateCancellationResponse(JsonRpcRequest request)
23412341
{
23422342
throw new TimeoutException(Resources.FormatOutboundInvocationTimedOut(nameof(this.OutboundRequestTimeout)), ex);
23432343
}
2344+
catch (ConnectionLostException ex) when (timeoutCancellationSource?.IsCancellationRequested is true && !cancellationToken.IsCancellationRequested)
2345+
{
2346+
throw new TimeoutException(Resources.FormatOutboundInvocationTimedOut(nameof(this.OutboundRequestTimeout)), ex);
2347+
}
23442348
catch (OperationCanceledException ex) when (this.DisconnectedToken.IsCancellationRequested && !effectiveOutboundCancellationToken.IsCancellationRequested)
23452349
{
23462350
throw new ConnectionLostException(Resources.ConnectionDropped, ex);

test/Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
<ItemGroup>
66
<PackageVersion Update="System.Collections.Immutable" Version="9.0.0" />
7-
<PackageVersion Update="System.IO.Pipelines" Version="9.0.0" />
7+
<PackageVersion Update="System.IO.Pipelines" Version="10.0.8" />
88
<PackageVersion Update="System.Reflection.Metadata" Version="9.0.0" />
9+
<PackageVersion Update="System.Text.Json" Version="10.0.8" />
910
</ItemGroup>
1011
</Project>

test/StreamJsonRpc.Analyzer.Tests/Verifiers/ReferencesHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal static class ReferencesHelper
1717
.AddPackages([
1818
new PackageIdentity("System.Memory", "4.6.3"),
1919
new PackageIdentity("System.Threading.Tasks.Extensions", "4.6.1"),
20-
new PackageIdentity("Microsoft.Bcl.AsyncInterfaces", "10.0.1"),
20+
new PackageIdentity("Microsoft.Bcl.AsyncInterfaces", "10.0.8"),
2121
]);
2222
#endif
2323

test/StreamJsonRpc.Tests/TestBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ protected TestBase(ITestOutputHelper logger)
4242

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

45+
protected static bool IsTestRunOnAzurePipelines => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_DEFINITIONID"));
46+
4547
protected ITestOutputHelper Logger { get; }
4648

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

66+
// For some reason the assertion tends to be sketchy when running on Azure Pipelines.
67+
if (IsTestRunOnAzurePipelines)
68+
{
69+
Assert.SkipWhen(weakReference.IsAlive, "Weak reference is still alive.");
70+
}
71+
6472
Assert.False(weakReference.IsAlive);
6573
}
6674

tools/GitHubActions.ps1

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,34 @@ function Add-GitHubActionsEnvVariable {
88
[string]$Value
99
)
1010

11+
if ([string]::IsNullOrWhiteSpace($Path)) {
12+
throw "GitHub Actions environment file path must not be empty."
13+
}
14+
1115
if ([string]::IsNullOrWhiteSpace($Name)) {
12-
throw "GitHub Actions environment variable names must not be empty."
16+
throw "GitHub Actions environment variable name must not be empty."
1317
}
1418

1519
$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
1620
$delimiter = [guid]::NewGuid().ToString('N')
1721
[System.IO.File]::AppendAllText($Path, "$Name<<$delimiter`n$Value`n$delimiter`n", $utf8NoBom)
1822
}
23+
24+
function Add-GitHubActionsPath {
25+
param(
26+
[string]$Path = $env:GITHUB_PATH,
27+
[Parameter(Mandatory = $true)]
28+
[string]$Value
29+
)
30+
31+
if ([string]::IsNullOrWhiteSpace($Path)) {
32+
throw "GitHub Actions path file path must not be empty."
33+
}
34+
35+
if ([string]::IsNullOrWhiteSpace($Value)) {
36+
throw "GitHub Actions path entry must not be empty."
37+
}
38+
39+
$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
40+
[System.IO.File]::AppendAllText($Path, "$Value`n", $utf8NoBom)
41+
}

0 commit comments

Comments
 (0)