Skip to content

SourceFileUpdateTests.RenameSourceFile: flaky failure — FileNotFoundException on Foo.cs / missing '> Renamed.cs' output #55137

Description

@MichaelSimons

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1490592
Leg Name: TestBuild: macOS (arm64) - osx.15.arm64.open — Helix work item dotnet-watch.Tests.dll.2 (Finished, exit code 2)
Pull request: #55109

Error Details

Microsoft.DotNet.Watch.UnitTests.SourceFileUpdateTests.RenameSourceFile intermittently fails on the macOS arm64 Helix leg. The useMove: false variant hits a FileNotFoundException on the renamed dependency file (Foo.cs) and never observes the expected > Renamed.cs hot-reload output, so the assertion fails. It passed on retry (build 1491201), confirming it is flaky rather than a product regression. (The useMove: true variant is skipped due to the known limitation tracked in #43320.)

failed RenameSourceFile (False) (5s 768ms)
  Assertion failed.
  Failed to find expected prefix: '> Renamed.cs'
   at Microsoft.DotNet.Watch.UnitTests.SourceFileUpdateTests.RenameSourceFile(Boolean useMove) in /_/test/dotnet-watch.Tests/HotReload/SourceFileUpdateTests.cs:233
...
dotnet watch ❌ An unexpected error occurred: System.IO.FileNotFoundException: Could not find file '/private/tmp/helix/working/AB0409A7/t/dotnetSdkTests.xBTNK8Z7/RenameSourceF---E7D36796/Dependency/Foo.cs'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(...)

Note: the existing KBE #40006 does not cover this — its pattern is hard-coded to dotnet-watch.Tests.dll.1 and the old ... has failed Helix.Sdk message format, whereas this failure is in the dll.2 partition and surfaces via the newer Monitor Helix Jobs failed (Finished, exit code 2) format. The pattern below matches the test failure directly in the Helix console log, so ExcludeConsoleLog is false.

Error Message

{
    "ErrorMessage": ["failed RenameSourceFile", "SourceFileUpdateTests.RenameSourceFile"],
    "BuildRetry": true,
    "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1490592
Error message validated: [failed RenameSourceFile SourceFileUpdateTests.RenameSourceFile]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/5/2026 7:15:15 AM UTC

Report

Build Repository Test Pull Request
1521428 dotnet/sdk RenameSourceFile
1511599 dotnet/sdk RenameSourceFile #55144
1490592 dotnet/sdk RenameSourceFile #55109

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions