Skip to content

Fix template path in quarantine pipeline - #14937

Merged
AR-May merged 2 commits into
dotnet:mainfrom
AR-May:ar-may-fix-quarantine-template-path
Sep 7, 2026
Merged

AR-May merged 2 commits into
dotnet:mainfrom
AR-May:ar-may-fix-quarantine-template-path

Conversation

@AR-May

@AR-May AR-May commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

The quarantine pipeline has not run since #14371 (~50 days!). It fails
while parsing YAML.

Cause: template: paths resolve relative to the file that contains them.
quarantine.yml is already in azure-pipelines/, so the extra prefix pointed to
a folder that does not exist.

Template paths resolve relative to the referencing file. quarantine.yml
is already inside azure-pipelines/, so the azure-pipelines/ prefix
resolved to azure-pipelines/azure-pipelines/ and the pipeline failed at
YAML compile time on every run since dotnet#14371.

Co-authored-by: Copilot App <[email protected]>
@AR-May
AR-May marked this pull request as ready for review September 4, 2026 12:27
@AR-May
AR-May requested review from VolPlita and a lite review from Copilot September 4, 2026 12:27
@AR-May
AR-May enabled auto-merge (squash) September 4, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a straightforward correction of YAML template paths and appears consistent across all affected jobs with no functional risk beyond restoring the pipeline parsing.

Pull request overview

Fixes YAML template includes in the Azure DevOps quarantine pipeline by updating template: paths to be relative to azure-pipelines/quarantine.yml, restoring the pipeline’s ability to parse and run.

Changes:

  • Update the check-documentation-only-change.yml template reference in each quarantine job (Windows/Linux/macOS) to use a relative path.
File summaries
File Description
azure-pipelines/quarantine.yml Fix template include paths so YAML parsing succeeds and the quarantine pipeline can run again.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@VolPlita

VolPlita commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

pipelines still fail, check-documentation-only-change.yml runs git diff ... HEAD~1, while the jobs use a shallow checkout without HEAD~1, so build never executes and artifacts are missing.

Comment thread azure-pipelines/quarantine.yml Resolved
The quarantine definition fetches with depth 1, but
check-documentation-only-change.yml runs `git diff HEAD HEAD~1`, which fails
with "unknown revision" because the parent commit was never fetched. The step
then fails the job before the build runs. msbuild-pr is unaffected because its
definition sets fetchDepth 0.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0518e79a-a652-4869-aa2e-5dc82c738c0b
@AR-May
AR-May requested a review from VolPlita September 4, 2026 13:37
@AR-May

AR-May commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@AR-May
AR-May merged commit 594deea into dotnet:main Sep 7, 2026
14 checks passed
ViktorHofer pushed a commit that referenced this pull request Sep 10, 2026
Related issue(s): Windows Core CI failure in
`AutoUsesChangeWaveFallback`, observed while validating #14937.
<!-- Use "Fixes #..." only when this PR completes the linked issue. -->

### Context

<!-- What user-visible problem does this solve? -->

`RecordingFileSystem` records enumeration calls in an unsynchronized
`List<T>`, but the legacy file matcher can invoke the same filesystem
wrapper from parallel directory traversal. This makes the test fixture
itself unsafe: an otherwise valid glob can fail intermittently or leave
an incomplete record of enumeration calls.

The reported Windows Core job failed in the net472/x86 Framework tests
with an `AggregateException` containing `IndexOutOfRangeException`
failures from `List<T>.Add` in `RecordingFileSystem.EnumerateFiles` and
`EnumerateDirectories`. The same test passed on retry without a code
change; retrying does not remove the underlying race.

#### Step-by-step failure mode

1. `AutoUsesChangeWaveFallback` sets `MSBUILDDISABLEFEATURESFROMVERSION`
to `Wave18_11`, resets change-wave state, and verifies that a matcher
backed by `DirectRecordingFileSystem` selects the legacy implementation.
2. The test invokes `GetFiles` with a recursive `**/*.cs` glob over a
directory tree.
3. When the available parallelism is at least two,
`FileMatcher.GetFilesRecursive` uses `Parallel.ForEach` to traverse
subdirectories.
4. Multiple workers call enumeration methods on the same
`DirectRecordingFileSystem`. Those methods are inherited from
`RecordingFileSystem` and append to the same `EnumerationCalls` list
without synchronization.
5. Concurrent `List<T>.Add` operations race on shared size, capacity,
and backing-array state. This can lose recorded entries or produce an
invalid array access.
6. Exceptions thrown by traversal workers are surfaced through
`Parallel.ForEach` as an `AggregateException`, failing the test.

The historical exception stacks identify this path. The new regression
independently reproduced lost writes before the fix: **12,283 calls
recorded instead of 12,288** on net472/x86. Concurrent corruption is
therefore reproduced; the exact instruction-level interleaving behind
the historical `IndexOutOfRangeException` is inferred, not reproduced.

### Changes Made

<!-- Summarize the approach and meaningful changes. -->

- Replace the private fixture's `List<(string Operation, string Path,
string Pattern)>` with `ConcurrentQueue` and change all three recording
sites to `Enqueue`: `EnumerateFiles`, `EnumerateDirectories`, and
`EnumerateFileSystemEntries`.
- Add `RecordingFileSystemPreservesConcurrentEnumerationCalls`, which
invokes all three methods through `DirectRecordingFileSystem` in a
bounded `Parallel.For`, then checks the total count and exact recorded
tuples without assuming cross-thread ordering.

A concurrent queue makes every recording write thread-safe while
preserving sequential FIFO behavior and the existing enumeration-based
assertions. It avoids adding locks around filesystem operations or
changing production traversal. The fix is confined to
`src/Framework.UnitTests/Globbing/FileMatcherOptimized_Tests.cs`.

### Compatibility

<!-- Delete if not applicable. Note affected modes/platforms and changes
to defaults,
diagnostics, APIs or protocols, including compatibility between older
and newer hosts. -->

Test-only change. No production behavior, defaults, diagnostics, APIs,
protocols, or change-wave behavior changes. No changes targeting the
separate macOS or Windows Full incidents.

### Testing

<!-- Give relevant evidence, including commands/results and any coverage
gaps.
For MT/lifecycle changes, consider repeated builds, cancellation and
mixed-version hosts
where relevant; a full matrix is not required for every change. -->

- **Before fix:** the new regression failed on net472/x86 with 12,283
actual entries versus 12,288 expected.
- **Full repository build:** `.\build.cmd -v quiet -msbuildEngine
dotnet` passed with zero warnings/errors.
- **Affected test class:** `.\.dotnet\dotnet.exe test
"$PWD\src\Framework.UnitTests\Microsoft.Build.Framework.UnitTests.csproj"
--no-build -- --filter-class
"Microsoft.Build.UnitTests.Globbing.FileMatcherOptimized_Tests"` passed
on net472/x86 and net11.0/x64: **220 passed, 39 skipped, zero
failures**.
- **Framework Release tests:** `.\.dotnet\dotnet.exe test
"$PWD\src\Framework.UnitTests\Microsoft.Build.Framework.UnitTests.csproj"
-c Release -- --no-progress` passed: **2,237 passed, 73 skipped, zero
failures** across both target frameworks.
- **Bootstrap checks:** environment activation, SDK version, MSBuild
help, and bootstrap `dotnet build
src\Samples\Dependency\Dependency.csproj -v:q` passed.

Validation used the repository-pinned .NET SDK because the installed
Visual Studio MSBuild was older than the SDK's minimum supported
version. Bootstrap copy locks from local build/compiler servers were
cleared before the successful Release run; no repository configuration
changes were needed. The concurrency regression is scheduling-dependent
and does not force the historical exception interleaving.

Co-authored-by: Copilot App <[email protected]>
@AR-May AR-May self-assigned this Sep 11, 2026
This was referenced Nov 20, 2026
flxjk pushed a commit to flxjk/typespec that referenced this pull request Nov 25, 2026
Updated [Microsoft.Build](https://github.com/dotnet/msbuild) from
18.11.0 to 18.12.2.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.Build's
releases](https://github.com/dotnet/msbuild/releases)._

## 18.12.2

## What's Changed
* [TaskAnalyzer] Align diagnostic severities and ignore open generic
ITaskItem<T> by @​VolPlita in
dotnet/msbuild#14811
* Add multi-threading option to build response file by @​ViktorHofer in
dotnet/msbuild#14837
* Anchor MSBuildTask0003 code fix on the flagged call and withhold it
where TaskEnvironment cannot bind by @​ViktorHofer with @​Copilot in
dotnet/msbuild#14810
* Bump main to 18.12 after the vs18.11 branch snap by @​ViktorHofer in
dotnet/msbuild#14841
* Report MSBuildTask0005 at the unsafe call site so it can be suppressed
there by @​ViktorHofer with @​Copilot in
dotnet/msbuild#14829
* Revert "Add multi-threading option to build response file" by
@​ViktorHofer in dotnet/msbuild#14851
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14853
* [main] Update dependencies from dotnet/arcade by @​dotnet-maestro[bot]
in dotnet/msbuild#14854
* Update MicrosoftBuildVersion in analyzer template by
@​github-actions[bot] in dotnet/msbuild#14565
* Revert "Revert "Add multi-threading option to build response file"" by
@​ViktorHofer in dotnet/msbuild#14855
* Fix stale gh-aw-actions/setup pin causing "activation" job failure by
@​JanProvaznik with @​Copilot in
dotnet/msbuild#14842
* Make isolated graph builds fail deterministically on undeclared
cross-project targets by @​AlesProkop with @​Copilot in
dotnet/msbuild#14280
* Revise temp path handling in README by @​baronfel in
dotnet/msbuild#14834
* Fix BuildCheck rule configuration and task name casing bug by @​AR-May
in dotnet/msbuild#14778
* Remove MSBuildImportedProject item from the XSD by @​drewnoakes in
dotnet/msbuild#14659
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14866
* Require ready-for-training tag for OptProf by @​AlesProkop in
dotnet/msbuild#14867
* Ignore stale MSBuild server console writes by @​JanProvaznik in
dotnet/msbuild#14850
* Regenerate Expert Code Review workflow lock by @​JanProvaznik with
@​Copilot in dotnet/msbuild#14870
* [main] Update dependencies from dotnet/arcade by @​dotnet-maestro[bot]
in dotnet/msbuild#14896
* [main] Update dependencies from dotnet/roslyn by @​dotnet-maestro[bot]
in dotnet/msbuild#14900
* [main] Update dependencies from nuget/nuget.client by
@​dotnet-maestro[bot] in dotnet/msbuild#14669
* [main] Source code updates from dotnet/dotnet by @​dotnet-maestro[bot]
in dotnet/msbuild#14886
* Expose AbsolutePath.GetCanonicalForm() by @​JanProvaznik with
@​Copilot in dotnet/msbuild#14873
* Make release checklist step 1.3 a full branch-retirement audit by
@​ViktorHofer in dotnet/msbuild#14911
* Resolve PathLike MatchOnMetadata against the thread working directory
by @​JanProvaznik in dotnet/msbuild#14916
* Fix typo in project dependency explanation by @​DanexisIbrahimAbtula
in dotnet/msbuild#14885
* Preserve events routed through the TaskHostTask by @​AR-May in
dotnet/msbuild#14876
* Fix NormalizePath and other intrinsic functions in multithreaded mode
by @​AR-May in dotnet/msbuild#14875
* Bump actions/checkout from 7.0.0 to 7.0.1 by @​dependabot[bot] in
dotnet/msbuild#14887
* Bump github/gh-aw-actions/setup-cli from 0.87.2 to 0.87.9 by
@​dependabot[bot] in dotnet/msbuild#14888
* Bump github/gh-aw-actions/setup from 0.82.9 to 0.87.9 by
@​dependabot[bot] in dotnet/msbuild#14889
* Upgrade gh-aw to v0.88.2 and recompile agentic workflow lock files by
@​AR-May in dotnet/msbuild#14935
* Preserve error detail when ContinueOnError downgrades an error to a
warning by @​AR-May in dotnet/msbuild#14918
* Fix Dependabot ignore rule to match gh-aw-actions sub-path actions by
@​AR-May in dotnet/msbuild#14938
* [Flaky Test] Quarantine 1 flaky test (TaskEnvironment) by
@​github-actions[bot] in dotnet/msbuild#14662
* Fix template path in quarantine pipeline by @​AR-May in
dotnet/msbuild#14937
* Run expert code review when a draft PR is marked ready for review by
@​AR-May in dotnet/msbuild#14952
* [Dreaming] dreaming: clarify RenderImmediateMessage as the correct
path for immediate TerminalLogger output by @​github-actions[bot] in
dotnet/msbuild#14381
* [Dreaming] Clarify: don't hardcode backslash path separators in test
XML by @​github-actions[bot] in
dotnet/msbuild#14973
* Regenerate review-on-open lock file by @​AR-May in
dotnet/msbuild#14977
* Recognize AbsolutePath.Value canonicalization in task analyzers by
@​JanProvaznik in dotnet/msbuild#14970
* improve issue and pr templates based on history by @​JanProvaznik in
dotnet/msbuild#14982
* Detect environment-dependent temp helpers in TaskAnalyzer by
@​ViktorHofer with @​Copilot in
dotnet/msbuild#14975
* Document registered task object semantics in multithreaded builds by
@​JanProvaznik in dotnet/msbuild#14919
* Add server-only MSBUILDDEBUGONSTART modes by @​JanProvaznik in
dotnet/msbuild#14988
* Preserve manifest input streams when writing manifests by @​dtivel in
dotnet/msbuild#14883
* Scope MT-specific TaskAnalyzer diagnostics and support .editorconfig
by @​VolPlita in dotnet/msbuild#14775
* [main] Update dependencies from dotnet/arcade by @​dotnet-maestro[bot]
in dotnet/msbuild#14948
 ... (truncated)

Commits viewable in [compare
view](dotnet/msbuild@v18.11.0...v18.12.2).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Build&package-manager=nuget&previous-version=18.11.0&new-version=18.12.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants