docs(management): document TriggerClient for multi-target SDK usage#3694
docs(management): document TriggerClient for multi-target SDK usage#3694ericallam wants to merge 2 commits into
Conversation
Adds a dedicated `Multiple SDK clients` page covering when to reach
for `new TriggerClient({...})` vs `configure()` vs `auth.withAuth`,
the env-var fallback rules, the isolation contract, and the curated
namespace surface.
Updates the existing management overview, authentication, preview
branches, and triggering pages to surface the new pattern. Refreshes
the `auth.withAuth` section: removes the stale concurrency warning
and the reference to issue #3298, since the fix landed alongside
TriggerClient. Adds the `tr_preview_*` key prefix to the example.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📜 Recent review details⏰ 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). (2)
WalkthroughThis PR adds documentation for using multiple TriggerClient instances from a single process. It introduces docs/management/multiple-clients.mdx covering client configuration, env-var precedence, ApiClientMissingError, available management APIs, unavailable task-scoped helpers, isolation semantics, and inheritContext. It updates authentication guidance (including tr_preview_ prefix and auth.withAuth AsyncLocalStorage scoping), integrates examples into the management overview, adds triggering and preview-branch guidance with a Promise.all example, and updates docs navigation to include the new page. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Define `payload` and surface the `emailTask` type import so the example snippets across overview, multiple-clients, and preview branches docs run as pasted.
Summary
Docs follow-up for #3683 (
TriggerClientfor per-instance SDK configuration). Adds a dedicated reference page and threads the new pattern through the existing management + preview-branches docs.What's in
New page
docs/management/multiple-clients.mdx— when to useTriggerClientvsconfigure()vsauth.withAuth, env-var fallback rules, isolation contract, namespace surface,inheritContextopt-in, and a when-to-use-what table.Updated pages
docs/management/authentication.mdx— rewrote theauth.withAuthsection to reflect the now-ALS-backed semantics (the prior version warned about concurrency races and pointed at issue bug: global configure() silently ignores subsequent calls, parallel requests always use first caller's auth #3298 as a tracked fix; that fix landed in feat(sdk,core): add TriggerClient for per-instance SDK configuration #3683). Addedtr_preview_*to the key prefix list. Reframed the multi-target use case to lead withTriggerClient, withauth.withAuthas the temporary-override helper.docs/management/overview.mdx— added aMultiple clients in one processsubsection.docs/deployment/preview-branches.mdx— added aTriggering across multiple branches from one processexample.docs/triggering.mdx— one-liner pointing at the new page for cross-project triggering.docs/docs.json— slottedmanagement/multiple-clientsinto the Management API nav, right after authentication.Paired with #3683.
Test plan
/management/multiple-clients,/management/authentication)