Skip to content

Conversation

joseph0926
Copy link
Contributor

@joseph0926 joseph0926 commented Sep 6, 2025

CI issues related to Nx Cloud: #9584 #9334 #9310

Problem

The CI pipeline has been timing out after 1 hour with the error

NX   No new completed tasks after 3600 seconds.

Maybe Root Cause

In commit eee4405, the workflow was refactored with the following changes

  • Removed the agents job that was starting 3 distributed agents
  • Added tanstack/config/.github/setup@main for simplified setup
  • Added --parallel=3 flag to the test command

However, the environment variables still had

  • NX_CLOUD_DISTRIBUTED_EXECUTION: true
  • NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 3

This created a configuration mismatch where

  1. The main job starts the CI orchestrator with npx nx-cloud start-ci-run
  2. The orchestrator waits for 3 agents to connect (as configured)
  3. No agents actually start (since the agents job was removed)
  4. After 1 hour of waiting, the job times out

Solution

Set NX_CLOUD_DISTRIBUTED_EXECUTION: false to align with the simplified workflow structure. This ensures tests run directly in the main job.

Note

While we cannot fully replicate the GitHub Actions environment locally, this analysis is based on

  • The observed CI behavior and error messages
  • Local testing confirming tests pass without distributed execution
  • The clear mismatch between the workflow structure and configuration

Copy link
Contributor

coderabbitai bot commented Sep 6, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

nx-cloud bot commented Sep 6, 2025

View your CI Pipeline Execution ↗ for commit edbe114

Command Status Duration Result
nx affected --targets=test:lib,test:types,test:... ✅ Succeeded 3s View ↗
nx affected --targets=test:lib --base=eee4405f7... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-06 01:17:44 UTC

@joseph0926
Copy link
Contributor Author

joseph0926 commented Sep 6, 2025

@manudeli
I would appreciate it if you could review these changes when you have time.


I'm not entirely sure if this is the perfect solution, but anyway, this PR passes the NX Cloud stage with the modified pr.yml,,

Copy link

codesandbox-ci bot commented Sep 6, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit edbe114:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@joseph0926 joseph0926 changed the title [v4 ]fix(ci): resolve v4 CI timeout by disabling Nx Cloud distributed execution [v4] fix(ci): resolve v4 CI timeout by disabling Nx Cloud distributed execution Sep 6, 2025
@manudeli manudeli self-assigned this Sep 6, 2025
Copy link
Collaborator

@manudeli manudeli left a comment

Choose a reason for hiding this comment

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

Let's try this after merging

@manudeli manudeli merged commit 3ef06cf into TanStack:v4 Sep 6, 2025
5 checks passed
@manudeli
Copy link
Collaborator

manudeli commented Sep 6, 2025

@joseph0926 I think you fixed it! 👍
image

@joseph0926
Copy link
Contributor Author

@joseph0926 I think you fixed it! 👍

@manudeli
That's a relief.
Thanks for testing it!

@joseph0926 joseph0926 deleted the fix/v4-nx-cloud-distributed-execution branch September 6, 2025 09:34
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.

2 participants