perf: Turborepo caching for app-store CLI build#23515
Conversation
- Fix incorrect output paths from app-store/ to packages/app-store/ - Fix incorrect input paths to match actual file locations - Remove cache: false to enable caching - Add all 11 generated files to outputs array - Add NEXT_PUBLIC_IS_E2E env var for proper cache invalidation - Add specific input patterns to avoid cache invalidation from generated files - Improves local dev experience with cache hits vs ~3.1s cache misses Performance improvement: builds go from ~3.1 seconds (cache miss) to instant cache hits when inputs haven't changed. Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Warning Rate limit exceeded@keithwillcode has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 16 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Walkthrough
Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
982b400
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
turbo.json (3)
470-478: Consider adding root-level entry files to inputs to avoid stale cachesIf the generator consumes each app’s root entry (commonly index.ts/tsx/js) for metadata, changes there won’t currently invalidate the cache. Add these patterns:
"inputs": [ "../../packages/app-store/**/package.json", "../../packages/app-store/**/config.json", + "../../packages/app-store/**/index.ts", + "../../packages/app-store/**/index.tsx", + "../../packages/app-store/**/index.js", "../../packages/app-store/**/api/**", "../../packages/app-store/**/components/**", "../../packages/app-store/**/lib/**", "../../packages/app-store/**/pages/**", "../../packages/app-store-cli/src/**" ],Please confirm whether the CLI reads root-level entry files; if not, feel free to ignore this.
470-478: Inputs set is appropriately specific (good) — excluding static assets is fineGiven Cal.com’s separate copy script for app-store static assets, it’s correct not to include
packages/app-store/**/static/**here; those shouldn’t affect codegen cache keys.Optional: shorten paths to
../app-store/**(from the CLI workspace) for readability; functionally identical.
492-492: Redundant env entry; already covered by globalEnv
NEXT_PUBLIC_IS_E2Eis inglobalEnv, so this per-taskenvis unnecessary. Remove to reduce duplication.], - "env": ["NEXT_PUBLIC_IS_E2E"] +
📜 Review details
Configuration used: Path: .coderabbit.yaml
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.
📒 Files selected for processing (2)
package.json(1 hunks)turbo.json(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: calcom/cal.com#0
File: AGENTS.md:0-0
Timestamp: 2025-09-02T12:29:32.584Z
Learning: Use `yarn build` to build all packages
Learnt from: saurabhraghuvanshii
PR: calcom/cal.com#23460
File: packages/app-store/paypal/components/PaypalPaymentComponent.tsx:55-55
Timestamp: 2025-08-30T00:30:44.208Z
Learning: Cal.com uses a build-time script `apps/web/scripts/copy-app-store-static.js` that automatically copies static assets from `packages/app-store/**/static/**/*` to `apps/web/public/app-store/` during both development and build processes.
📚 Learning: 2025-09-02T12:29:32.584Z
Learnt from: CR
PR: calcom/cal.com#0
File: AGENTS.md:0-0
Timestamp: 2025-09-02T12:29:32.584Z
Learning: Use `yarn build` to build all packages
Applied to files:
package.json
📚 Learning: 2025-08-30T00:30:44.208Z
Learnt from: saurabhraghuvanshii
PR: calcom/cal.com#23460
File: packages/app-store/paypal/components/PaypalPaymentComponent.tsx:55-55
Timestamp: 2025-08-30T00:30:44.208Z
Learning: Cal.com uses a build-time script `apps/web/scripts/copy-app-store-static.js` that automatically copies static assets from `packages/app-store/**/static/**/*` to `apps/web/public/app-store/` during both development and build processes.
Applied to files:
package.json
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Install dependencies / Yarn install & cache
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
package.json (1)
19-19: Approve switching to Turbo for app-store builds
Confirmed that @calcom/app-store-cli exposes abuildscript (packages/app-store-cli/package.json: line 11). Update any docs or CI steps still invokingyarn app-store-cli build.turbo.json (1)
480-491: All 11 generated artifacts verified present
All expected files were found after a cache-miss build—no missing outputs.
E2E results are ready! |
What does this PR do?
Fixes Turborepo caching for the
@calcom/app-store-cli#buildtask to improve local development experience. The build previously took ~3.1 seconds on every run due to caching being disabled and incorrect configuration. With these changes, subsequent builds with unchanged inputs complete almost instantly via cache hits.Key Changes:
cache: false../../app-store/**to../../packages/app-store/**Performance Impact:
How should this be tested?
Local Testing
Verification Points
Generated files: Verify all 11 files are created in
packages/app-store/:analytics.services.generated.tsapps.metadata.generated.tsapps.server.generated.tsapps.browser.generated.tsxapps.schemas.generated.tsapps.keys-schemas.generated.tsbookerApps.metadata.generated.tscrm.apps.generated.tscalendar.services.generated.tspayment.services.generated.tsvideo.adapters.generated.tsCache behavior: Use
yarn turbo build --filter=@calcom/app-store-cli --verbosity=2to verify cache hits/missesMandatory Tasks (DO NOT REMOVE)
N/A - This is a build configuration change that doesn't require documentation updates.
Checklist
Link to Devin run: https://app.devin.ai/sessions/940987ca48bc4adab1b2771f7a8dc12c
Requested by: @keithwillcode
../../packages/app-store/**paths are correct vs original../../app-store/**NEXT_PUBLIC_IS_E2Edependency doesn't cause unintended side effects