Fix publish pipeline - #488
Merged
Vladimir Morozov (vmoroz) merged 3 commits intoAug 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (5)
.ado/publish.yml:331
MatrixEntry.DotnetVersiondoesn’t match the matrix keyDotNetVersionused elsewhere in this file (e.g., when constructing artifact paths). In Azure Pipelines template expressions, this likely resolves to empty/undefined, making runs harder to identify and potentially masking mistakes. UseMatrixEntry.DotNetVersionconsistently.
testRunTitle: Test ${{ MatrixEntry.TargetRuntime }} ${{ MatrixEntry.DotnetVersion }}
.ado/publish.yml:37
- The
osvalue casing is inconsistent (macOsvsmacOS). If this field is used in conditions, template logic, or reporting, inconsistent casing can cause subtle mismatches. Normalize the casing across entries (e.g., consistentlymacOS).
vmImage: macos-15
os: macOs
.ado/publish.yml:43
- The
osvalue casing is inconsistent (macOsvsmacOS). If this field is used in conditions, template logic, or reporting, inconsistent casing can cause subtle mismatches. Normalize the casing across entries (e.g., consistentlymacOS).
vmImage: macos-15-arm64
os: macOS
test/GCTests.cs:67
- The retry bound
20is duplicated across tests as a magic number. Introduce a shared constant (e.g.,const int MaxGcAttempts = 20;) to make the intent explicit and to keep future tuning consistent across both tests.
// JS GC is asynchronous, so pump a bounded number of cycles until the two temporary
// handles are released rather than asserting after a single GC.
long handleCount = 0;
for (int attempt = 0; attempt < 20; attempt++)
{
nodejs.GC();
nodejs.Run(() => { handleCount = JSRuntimeContext.Current.GCHandleCount; });
if (handleCount == 3 + 5)
{
break;
}
}
test/GCTests.cs:122
- The retry bound
20is duplicated across tests as a magic number. Introduce a shared constant (e.g.,const int MaxGcAttempts = 20;) to make the intent explicit and to keep future tuning consistent across both tests.
for (int attempt = 0; DotnetClass.Instances != 0 && attempt < 20; attempt++)
{
nodejs.GC();
nodejs.Run(() => { });
System.GC.Collect();
System.GC.WaitForPendingFinalizers();
}
Jason Ginchereau (jasongin)
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gets the CI (
publish.yml) and Release pipelines back to green, makes testfailures diagnosable from a run, fixes two intermittently failing GC tests, and
clears a Critical Component Governance alert.
CI pipeline (
.ado/publish.yml)macos-15/macos-15-arm64. The previousmacos-14images are being retired, and themacos-14-arm64label no longerroutes on the hosted pool, which blocked the Apple-Silicon build and test jobs.
The
osx-x64andosx-arm64build/test jobs now target the macOS 15 images.PublishTestResultsand a new
test-logs-*pipeline artifact now run withcondition: succeededOrFailed(), and aCopyFilesstep collects each testcase's native build log next to the
.trx. A failing test run is nowdiagnosable from the published artifacts instead of leaving nothing behind.
continueOnErrorfrom the test-runstep so a failed test run surfaces as a failure rather than a warning.
test-logs-*artifact name is suffixedwith
$(System.JobAttempt), so re-running only the failed jobs no longercollides with the artifact published by the previous attempt.
Flaky GC tests (
test/GCTests.cs)GCObjectsandGCHandlesasserted an exact GC/finalization state after a singleGC pass. Releasing a wrapped .NET object is a two-phase finalization — the first
GC finalizes the JS wrapper (freeing its handle to the .NET object) and only a
later GC collects the now-unreachable object — and GC is asynchronous across the
JS and .NET runtimes, so a single pass was unreliable and failed intermittently.
Both tests now pump GC in a bounded loop (up to 20 cycles) until the expected
state is reached before asserting. A genuine leak still fails, since the loop
exhausts and the final assertion catches it.
Component Governance (
Directory.Packages.props)Bump
Nerdbank.GitVersioningfrom3.6.133to3.10.91to resolve a Criticalsecurity advisory flagged against the older version.
Testing
publish.yml) and Release pipelines pass on all platforms.