Skip to content

Comments

chore: Upgrade Turborepo from 1 to 2.5#23101

Merged
keithwillcode merged 10 commits intomainfrom
upgrate_turborepo
Aug 18, 2025
Merged

chore: Upgrade Turborepo from 1 to 2.5#23101
keithwillcode merged 10 commits intomainfrom
upgrate_turborepo

Conversation

@volnei
Copy link
Contributor

@volnei volnei commented Aug 14, 2025

What does this PR do?

Upgrade Turborepo from version 1.2 to 2.5.

  • Improves performance of task execution and caching, especially on large monorepos.
  • Updates turbo.json configuration to align with v2 syntax and behaviors.
  • Improves developer experience, particularly during local development.

Why?

  • Observed up to 50% reduction in page compilation time on first builds (next dev), improving feedback loop during development.
  • Turborepo 2 brings better scheduling and parallelism by default, which reduces unnecessary re-computation across packages.

@volnei volnei requested a review from a team as a code owner August 14, 2025 19:02
@volnei volnei requested a review from a team August 14, 2025 19:02
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 14, 2025

Walkthrough

Replaces Turbo CLI --scope with --filter across package scripts, Dockerfile prune commands, and README; upgrades turbo to ^2.5.5; adds embed-tests and embed-tests-quick scripts. Renames turbo.json top-level pipeline to tasks and adds STRIPE_TEAM_MONTHLY_PRICE_ID to globalEnv. Simplifies packages/trpc/tsconfig.json by moving path mappings into compilerOptions and reducing aliases to "~/*". Removes --include-dependencies from a README and a docs build example. No application API or exported/public code signatures changed.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a1f2958 and 198dd59.

📒 Files selected for processing (1)
  • turbo.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • turbo.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Production builds / Build Web App
  • GitHub Check: Production builds / Build Docs
  • GitHub Check: Production builds / Build Atoms
  • GitHub Check: Tests / Unit
  • GitHub Check: Production builds / Build API v1
  • GitHub Check: Production builds / Build API v2
  • GitHub Check: Type check / check-types
  • GitHub Check: Linters / lint
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upgrate_turborepo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app graphite-app bot requested a review from a team August 14, 2025 19:02
@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2025

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

Unknown release type "task" found in pull request title "task: Upgrade Turborepo from 1 to 2.5". 

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@volnei volnei changed the title task: upgrade turborepo from 1 to 2.5 task: Upgrade Turborepo from 1 to 2.5 Aug 14, 2025
@keithwillcode keithwillcode added core area: core, team members only foundation labels Aug 14, 2025
@dosubot dosubot bot added the ⬆️ dependencies Pull requests that update a dependency file label Aug 14, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 14, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (08/14/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@volnei volnei changed the title task: Upgrade Turborepo from 1 to 2.5 chore: Upgrade Turborepo from 1 to 2.5 Aug 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
turbo.json (1)

252-500: Nit: consider reducing “cache”: false where safe to regain incremental speed.

A large number of tasks are set to cache: false. In Turbo v2 the cache is more robust and repo-wide env hashing is already handled by env/globalEnv. Re-enabling cache for read-only tasks (e.g., lint, type-check, certain builds) can significantly cut CI times.

I can help identify safe tasks to re-enable caching and add output patterns where missing.

package.json (1)

127-127: Consider moving turbo to devDependencies.

Turbo is a build orchestration tool and isn’t required at runtime. Keeping it in devDependencies can reduce production install surface.

Apply this change:

  • Remove "turbo" from dependencies.
  • Add "turbo": "^2.5.5" under devDependencies.

I can prepare a follow-up diff if you’d like this change in this PR.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e237749 and 7627d73.

⛔ Files ignored due to path filters (2)
  • .yarn/releases/yarn-3.4.1.cjs is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • apps/api/v1/README.md (1 hunks)
  • infra/docker/api/Dockerfile (1 hunks)
  • package.json (3 hunks)
  • turbo.json (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/api/v1/README.md

[grammar] ~202-~202: There might be a mistake here.
Context: ...om/api --include-dependencies --no-depsOUTPUT DIRECTORY:apps/api/.next` In G...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: required
🔇 Additional comments (4)
infra/docker/api/Dockerfile (1)

29-40: Double-check Docker prune usage with Turbo’s Docker workflow.

You invoke turbo prune --docker but never switch to or copy from the pruned out directory that prune generates. The canonical flow is:

  • prune → switches to /app/out (or copy from /app/out) → install → build.

If the intention is to leverage prune to minimize install surface, ensure the Dockerfile follows the Turbo v2 Docker guide pattern; otherwise, running prune here may be a no-op for size reduction.

Would you like me to propose a minimal rework of this stage to correctly use the pruned output and reduce image size?

turbo.json (1)

252-500: Migration from pipeline → tasks looks consistent; scoped task keys need validation.

The structure under tasks mirrors the prior pipeline. However, the presence of keys like @calcom/prisma#build and @calcom/web#build at the root requires confirmation that Turbo v2 supports package-scoped task configuration at the root-level tasks block (as opposed to per-package overrides).

If you have Turbo v2 locally, please validate the config with the CLI or docs. I can also provide a follow-up patch moving package-specific overrides into the respective packages’ turbo config if needed.

package.json (2)

37-45: Good adoption of multi-filter syntax in dev scripts.

Using multiple --filter flags is the right approach in Turbo v2. Quoting filter values in JSON scripts is also correct.


31-31: LGTM: build:ai migrated to --filter.

This aligns with Turbo v2 syntax and will target only @calcom/ai tasks as intended.

@vercel
Copy link

vercel bot commented Aug 15, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Aug 18, 2025 1:00pm
cal-eu Ignored Ignored Aug 18, 2025 1:00pm

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/trpc/tsconfig.json (1)

22-22: Consider modern module resolution strategy.

"moduleResolution": "node" works, but if this package emits/consumes ESM or interoperates with Next.js tooling, NodeNext or Bundler can provide more accurate resolution and type behavior (especially for package exports). Optional, but worth a follow-up in a tooling PR.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7627d73 and a29f275.

📒 Files selected for processing (1)
  • packages/trpc/tsconfig.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (1)
packages/trpc/tsconfig.json (1)

22-36: Good move: paths now correctly lives under compilerOptions.

This aligns with TS config schema and ensures the mappings actually take effect (they’re ignored at the top level).

@keithwillcode
Copy link
Contributor

@volnei Are these CodeRabbit suggestions worth addressing?

Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

Type checks are failing, likely due to the tRPC tsconfig.json change

@github-actions github-actions bot marked this pull request as draft August 15, 2025 12:59
@volnei volnei requested a review from keithwillcode August 15, 2025 17:45
@volnei volnei marked this pull request as ready for review August 15, 2025 17:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/trpc/tsconfig.json (1)

22-22: Optional: consider TS 5 “bundler” moduleResolution

Sticking with "node" is fine, but with TS 5 and modern bundlers (Next.js, etc.), "bundler" often yields better alignment with ESM/resolution and TS path aliases. This is optional and may be a breaking change if your toolchain expects "node".

If you choose to switch:

-    "moduleResolution": "node",
+    "moduleResolution": "bundler",

Before changing, confirm your Next.js/tsconfig setup aligns with this and that local/editor tooling (tsserver) resolves modules as expected.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a29f275 and f1097ac.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/trpc/tsconfig.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Tests / Unit
  • GitHub Check: Type check / check-types
  • GitHub Check: Linters / lint
🔇 Additional comments (1)
packages/trpc/tsconfig.json (1)

23-25: Alias fix looks good — confirm baseUrl is set (add locally if not)

packages/trpc/tsconfig.json now defines the "~/*" alias but it extends "@calcom/tsconfig/react-library.json". I couldn't find that extended config in the repo, so I can't confirm whether it sets "baseUrl". Either add baseUrl here or confirm the extended config provides it.

  • File to update: packages/trpc/tsconfig.json

Apply this minimal change if you want the alias to resolve locally:

     "moduleResolution": "node",
+    "baseUrl": ".",
     "paths": {
       "~/*": ["./*"]
     }

@keithwillcode
Copy link
Contributor

@volnei Seeing ERROR unexpected argument '--include-dependencies' found error when deploying on Vercel. Coming from this command Error: Command "cd ../.. && yarn deploy --include-dependencies --no-deps" exited with 1

@keithwillcode keithwillcode disabled auto-merge August 15, 2025 18:03
@keithwillcode
Copy link
Contributor

Also another issue over in API v1 https://github.com/calcom/cal.com/actions/runs/16996013756/job/48186978709?pr=23101#step:9:475

@github-actions
Copy link
Contributor

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only ⬆️ dependencies Pull requests that update a dependency file foundation ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants