-
Notifications
You must be signed in to change notification settings - Fork 2.6k
chore(repo): add .NET format check + codeowners and unify native target handling #33323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit b20a071
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud has identified a possible root cause for your failed CI:
The test failure for dotnet:test is classified as 'environment_state' rather than 'code_change' for the following reasons:
File System Race Condition:
The error reports that /home/workflows/workspace/packages/nx/src/native/index.d.ts does not exist, but verification confirms the file is present on the filesystem with proper permissions and recent modification timestamps. This discrepancy indicates a timing issue where Jest's ts-jest transformer attempts to stat the file during cache key computation, but the file system operation fails despite the file existing.
Error Location in Test Infrastructure:
The failure occurs in ts-jest's getCacheKey() method, which is part of Jest's caching mechanism that runs before any test code executes. This is test infrastructure failing during setup, not a failure in the test logic or application code being tested.
No Similar Failures on Master Branch:
The similar task failure outputs for the master branch are empty, indicating this same test (dotnet:test) passes successfully on master with the same codebase state. If the PR's code changes caused this failure, we would not expect the test to pass consistently on master.
No Logical Connection to PR Changes:
The PR changes focus on:
- Adding format-native targets to the dotnet package
- Introducing a unified
run-native-target.jsscript - Removing
createProjectRootMappingsFromProjectConfigurationsfrom exports and implementing it locally - Updating CODEOWNERS
None of these changes:
- Modify the failing test file (
create-nodes.spec.ts) - Alter the nx native bindings or their TypeScript definitions
- Change Jest or ts-jest configuration
- Touch the file that cannot be found (
packages/nx/src/native/index.d.ts)
Environmental Indicators Present:
- File system operation failure (ENOENT) despite file existence
- Timing-sensitive operation (cache key computation requiring multiple file stats)
- Test infrastructure failure rather than test execution failure
- Non-deterministic behavior (file exists but cannot be accessed)
The failure exhibits classic symptoms of an environmental timing issue in the test infrastructure, not a legitimate code defect introduced by this pull request.
A code change would likely not resolve this issue, so no action was taken.
🎓 To learn more about Self Healing CI, please visit nx.dev
Current Behavior
Maven and .NET use a bespoke script to handle skipping an optional native target in case a system is not setup on a dev's machine.
.NET isn't in codeowners
Expected Behavior
This pull request introduces improvements to the build and formatting workflows for the
.NETand Maven plugins, streamlining the execution of native targets and updating code ownership assignments. The changes focus on refactoring build scripts to use a unified runner, adding new formatting capabilities for .NET projects, and updating the CODEOWNERS file for clearer team responsibilities.Build and Format Workflow Improvements
.NETanalyzer build command inpackages/dotnet/project.jsonto use the newrun-native-target.jsscript, replacing the previous direct script invocation. [1] [2]format-nativeand_format-nativetargets topackages/dotnet/project.json, enabling verification and fixing of code formatting for the .NET analyzer usingdotnet format.Unified Native Target Runner
scripts/run-native-target.jsscript to standardize running native build and install targets, controlled by environment variables for skipping builds.Maven Plugin Build Refactor
packages/maven/maven-plugin/project.jsonto use the new native target runner, and removed the obsoletescripts/build-maven-analyzer.jsscript. [1] [2]Ownership Updates
CODEOWNERSfile to assign.NET-related directories to@FrozenPandazand@AgentEnder, clarifying team responsibilities.Related Issue(s)
Fixes #