Skip to content

Fix locked directory cleanup in Template authoring tests - #56367

Merged
Evangelink merged 7 commits into
mainfrom
dev/amauryleve/fix-localize-template-cleanup
Oct 11, 2026
Merged

Evangelink merged 7 commits into
mainfrom
dev/amauryleve/fix-localize-template-cleanup

Conversation

@Evangelink

@Evangelink Evangelink commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #56222

Validation

  • built Microsoft.TemplateEngine.Authoring.Tasks.IntegrationTests successfully
  • verified the evaluated MSTestParallelizeScope property is ClassLevel
  • ran the compiled test executable 20 times with class-level parallelism enabled: 20/20 runs passed

Keep the task integration tests serial and run child dotnet commands through the SDK test harness so temporary directories are not left locked by parallel build processes.

Co-authored-by: Copilot App <[email protected]>
Copilot AI lite review requested due to automatic review settings September 21, 2026 19:08
@Evangelink
Evangelink requested a review from a team as a code owner September 21, 2026 19:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Make the serial MSTest scope explicit and remove the unrelated test-local dotnet command wrapper.

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

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.

Copilot review overview

🟡 Changes recommended

Verify the cleanup fix and revise the comment to avoid asserting an unproven cause.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Updates Template authoring integration tests to reduce Windows temporary-directory locking failures.

Changes:

  • Sets MSTestParallelizeScope to None.
  • Documents the serialization rationale.
File Description
test/​TemplateEngine/​Microsoft.TemplateEngine.Authoring.Tasks.IntegrationTests/​Microsoft.TemplateEngine.Authoring.Tasks.IntegrationTests.csproj Configures serialized test execution and adds explanatory documentation.

Evangelink and others added 2 commits September 22, 2026 14:09
Describe the serial test setting as mitigation for the observed Windows lock and link the tracking issue without attributing the lock to an unverified process.

Co-authored-by: Copilot App <[email protected]>
Keep class-level parallelism enabled while serializing only the two test classes that launch child dotnet builds through a shared resource lock.

Co-authored-by: Copilot App <[email protected]>
@Evangelink
Evangelink enabled auto-merge (squash) September 24, 2026 07:42
@dsplaisted

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

@Evangelink
Evangelink merged commit b0ab3d8 into main Oct 11, 2026
30 of 32 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/fix-localize-template-cleanup branch October 11, 2026 21:32
nagilson added a commit that referenced this pull request Oct 24, 2026
Restore the exact guards from #56367, removed by c328805. The FullFramework CanRunTask cleanup failure matches #56222. Preserve class-level parallelism while serializing the two contending test classes.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f
dotnet-maestro Bot added a commit that referenced this pull request Oct 27, 2026
[main] Source code updates from dotnet/dotnet


 - Merge main and resolve Layout guidance conflict

Preserve both macOS tool signing and SDK staging incrementality guidance.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Fix browser tools build outputs documentation link

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Reconcile browser server refactor with AOT serialization

Use the shared browser server base and synchronous lifetime across the flowed Hot Reload implementation. Preserve AOT JSON metadata and adapt serialization and environment tests.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Keep sdk-tasks transitive dependencies compatible with bootstrap MSBuild

Disable central transitive pinning for runtime-excluded MSBuild dependencies, matching the ApiCompat task project. This prevents compilation against newer metadata assemblies unavailable in the bootstrap host.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Complete pending VMR backflow for build 337783

Apply the dependency update generated by darc vmr resolve-conflict for subscription 94ba9a9b-a084-4c1e-bf44-d0c711c17773. Advance source provenance to VMR 990015a5472ed2d6d6669352dd9f365655160f39 and regenerate companion version properties.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Resolve Native AOT managed test module through MSBuild

Query TargetPath using the publish configuration and RID instead of searching for a guessed RID-specific output directory. Keep both native test runners aligned and fail explicitly if evaluation or module validation fails.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Retain managed build outputs for native CLI integration tests

Native AOT optimized publishing deliberately skips Build and its managed bin outputs. The test-module integration scenario requires those runnable outputs, so disable optimized publishing only for the test project while leaving product and host publishing unchanged.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Restore transitional test assets and reconcile flowed test setup

Retain net11 runtimes and reference packs in the test-only layout while flowed SDK packs target net12. Restore root-command naming and net11 WASM workload setup from main, and supply the VSTest entrypoint in the synthetic layout fixture.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Align supported frameworks and test output with flowed packs

Advertise net12 in the supported framework and implicit define list now that the flowed packs target it. Keep MTP expectations tied to generated net11 test apps rather than the parent SDK runtime, with regression coverage for both regex helpers.

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Keep unsupported-framework test above the .NET 12 version cap

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Fix downlevel desktop test assets and latest-TFM preview assertions

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Match unspecified virtual-project framework to the bundled SDK

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Fix watch framework, scoped Windows shutdown and legacy Blazor test hangs

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

Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Provision missing workload and Windows desktop test runtimes

Acquire workload-matched net11 Core and ASP.NET shared frameworks alongside the test-pack versions. Provision the Windows Desktop shared framework required for net11 GUI test startup, without changing the shipping layout.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Restore template authoring resource locks lost in codeflow

Restore the exact guards from #56367, removed by c328805. The FullFramework CanRunTask cleanup failure matches #56222. Preserve class-level parallelism while serializing the two contending test classes.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Isolate VSTest verbosity assertions from MSBuild console logging

Quiet only the MSBuild console logger so its detailed messages cannot split VSTest result lines. Preserve VSTest verbosity, result assertions, and the expected failing-test exit code.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Match default-document assets by filename in endpoint test

Avoid treating .br or .gz inside random parent directory names as compression extensions. Preserve the endpoint assertions and manifest baselines.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 15aae84f-8dff-42ac-b639-eed530fcdf5f

 - Restore NuGet signature verification for file-based apps

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

 - Restore CA1859 file-local type safeguards

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

 - Restore CA1001 disposable auto-property analysis

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

 - Restore CA1859 anonymous-type and value-flow safeguards

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

 - Restore NativeAOT first-run localization

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

 - Restore shared CI detection for test output

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

 - Restore Web AOT garbage collection defaults

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

 - Restore vendored MTP coverage reporter baseline

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

 - Restore dotnetup contributor documentation

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

 - Restore stale-reference maintenance automation

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

 - Restore supported runtime version features

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

 - Restore browser refresh server cleanup and framework support

Preserve the consolidated server, source-generated JSON, and existing browser protocol regression coverage while restoring the lost refactor.

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

 - Restore browser socket error logging

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

 - Restore ILLink incremental semaphore compatibility tests

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

 - Align browser guidance with restored shared implementation

Co-authored-by: Copilot App <[email protected]>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 29, 2026
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.

[AI discovered CI] LocalizeTemplateTests.CanRunTask fails cleaning locked directory

3 participants