-
-
Notifications
You must be signed in to change notification settings - Fork 953
fix(batch): rate limiting by token bucket no longer incorrectly goes negative #2837
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
🦋 Changeset detectedLatest commit: 53f7153 The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request enhances error handling for batch trigger operations, particularly in rate-limiting scenarios. It adds a changelog entry for a patch release, adjusts batch creation error response handling to clamp rate limit values to a minimum of 0, simplifies the BatchRateLimitExceededError message, and exposes the BatchTriggerError class as a public export in the SDK with additional diagnostic properties (isRateLimited, retryAfterMs, apiError, cause). The PR also includes a patch to the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
🧰 Additional context used📓 Path-based instructions (7)packages/trigger-sdk/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{js,ts,jsx,tsx,json,md,css,scss}📄 CodeRabbit inference engine (AGENTS.md)
Files:
{packages/core,apps/webapp}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/webapp/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
🧠 Learnings (19)📓 Common learnings📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:26:37.432ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:26:37.432ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
📚 Learning: 2025-11-27T16:27:35.304ZApplied to files:
🧬 Code graph analysis (1)packages/trigger-sdk/src/v3/shared.ts (2)
⏰ 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). (24)
🔇 Additional comments (9)
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. Comment |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @trigger.dev/build@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.3.2` ## trigger.dev@4.3.2 ### Patch Changes - fix(cli): update command should preserve existing package.json order ([#2810](#2810)) - Updated dependencies: - `@trigger.dev/build@4.3.2` - `@trigger.dev/core@4.3.2` - `@trigger.dev/schema-to-json@4.3.2` ## @trigger.dev/python@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/sdk@4.3.2` - `@trigger.dev/build@4.3.2` - `@trigger.dev/core@4.3.2` ## @trigger.dev/react-hooks@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.3.2` ## @trigger.dev/redis-worker@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.3.2` ## @trigger.dev/rsc@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.3.2` ## @trigger.dev/schema-to-json@4.3.2 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.3.2` ## @trigger.dev/sdk@4.3.2 ### Patch Changes - Improve batch trigger error messages, especially when rate limited ([#2837](#2837)) - Updated dependencies: - `@trigger.dev/core@4.3.2` ## @trigger.dev/core@4.3.2 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Also improves the BatchTriggerError when a result of getting rate limited.