Skip to content

Conversation

@leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Oct 3, 2025

Adds resource usage collection while running tasks.

@leosvelperez leosvelperez self-assigned this Oct 3, 2025
@netlify
Copy link

netlify bot commented Oct 3, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit ee2e174
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/690b8e6c0dc9e10008352c73
😎 Deploy Preview https://deploy-preview-32946--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Nov 5, 2025 5:56pm

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Oct 3, 2025

View your CI Pipeline Execution ↗ for commit ee2e174

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 58m 14s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 1m 41s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-05 18:56:04 UTC

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Failed to publish a PR release of this pull request, triggered by @leosvelperez.
See the failed workflow run at: https://github.com/nrwl/nx/actions/runs/18274180420

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-32946-64cab2a
Release details 📑
Published version 0.0.0-pr-32946-64cab2a
Triggered by @leosvelperez
Branch fix/nxc-3067
Commit 64cab2a
Workflow run 18274180420

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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 failing test "should be able to create an web-components workspace" is unrelated to the pull request changes.

The PR introduces a resource usage collection feature that adds metrics tracking for processes during task execution. The implementation includes:

  • Process metrics collector in Rust
  • Registration of CLI, daemon, and task processes
  • Silent failure handling (try-catch blocks) to ensure metrics never break execution

The test failure shows a Corepack error about missing packageManager field during workspace creation with pnpm. This failure is classified as flaky_task because:

  1. No logical connection: The PR modifies process metrics collection during task execution, not workspace creation or package.json handling
  2. Inconsistent behavior: 4 out of 5 similar tests passed (express, react-native, expo, nest), only web-components failed
  3. External tool error: The error originates from Corepack/pnpm, not from Nx code
  4. No reproducibility: The empty similar_task_failures indicates this error doesn't appear consistently
  5. Defensive coding: All metrics registration code is wrapped in try-catch blocks that silently fail

The web-components test is exhibiting non-deterministic behavior likely due to timing issues, Corepack state, or external registry conditions. The PR's metrics collection feature operates independently and cannot cause Corepack to modify packageManager field validation behavior during workspace creation.

A code change would likely not resolve this issue, so no action was taken.

Nx CloudView in Nx Cloud ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

@github-actions
Copy link
Contributor

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-32946-2118cbf
Release details 📑
Published version 0.0.0-pr-32946-2118cbf
Triggered by @leosvelperez
Branch fix/nxc-3067
Commit 2118cbf
Workflow run 18370775354

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.


/// The main collection loop that runs in a separate thread
/// Discovers current metrics and directly notifies subscribers (true push-based)
fn collection_loop(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check if &mut self can be used here

Copy link
Member Author

Choose a reason for hiding this comment

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

We can't use &mut self here because the function runs in a separate thread that needs to own its data. We can't pass references across thread boundaries due to Rust's ownership rules.

@github-actions
Copy link
Contributor

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-32946-614b701
Release details 📑
Published version 0.0.0-pr-32946-614b701
Triggered by @leosvelperez
Branch fix/nxc-3067
Commit 614b701
Workflow run 18784560903

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-32946-4176704
Release details 📑
Published version 0.0.0-pr-32946-4176704
Triggered by @leosvelperez
Branch fix/nxc-3067
Commit 4176704
Workflow run 19040278106

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@leosvelperez leosvelperez enabled auto-merge (squash) November 5, 2025 17:51
@leosvelperez leosvelperez merged commit a98b524 into master Nov 5, 2025
20 checks passed
@leosvelperez leosvelperez deleted the fix/nxc-3067 branch November 5, 2025 18:56
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