fix(deploy): accept CLI-captured Daytona credentials - #240
Conversation
|
Warning Review limit reached
More reviews will be available in 48 minutes and 6 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function resolveExpectedProviderConfigKey to centralize and handle the resolution of expected provider configuration keys, specifically ignoring catalog config keys for CLI-captured providers like Daytona. This helper is integrated into both connectIntegrations and resolveRuntimeCredentialEnv, and corresponding unit tests have been added to verify this behavior. Feedback on the changes suggests refactoring the helper function to use a standard try/catch block with await instead of .catch() to safely handle both synchronous and asynchronous errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| export async function resolveExpectedProviderConfigKey( | ||
| provider: string, | ||
| providerConfigKeys?: ProviderConfigKeyResolver | ||
| ): Promise<string | undefined> { | ||
| if (!providerConfigKeys || isCliCapturedProvider(provider)) { | ||
| return undefined; | ||
| } | ||
| return providerConfigKeys.resolve(provider).catch(() => undefined); | ||
| } |
There was a problem hiding this comment.
If providerConfigKeys.resolve(provider) throws an error synchronously, the .catch() block will not be evaluated because the error is thrown before the promise is returned and the catch handler is attached. Since this is an async function, the synchronous throw will be caught by the async wrapper and result in a rejected promise, which will propagate to the caller and potentially crash the deployment process.\n\nUsing a standard try/catch block with await is safer and more idiomatic in TypeScript/JavaScript, as it gracefully handles both synchronous throws and asynchronous promise rejections.
export async function resolveExpectedProviderConfigKey(
provider: string,
providerConfigKeys?: ProviderConfigKeyResolver
): Promise<string | undefined> {
if (!providerConfigKeys || isCliCapturedProvider(provider)) {
return undefined;
}
try {
return await providerConfigKeys.resolve(provider);
} catch {
return undefined;
}
}|
pr-reviewer could not complete review for #240 in AgentWorkforce/workforce. |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. pr-reviewer could not complete review for #240 in AgentWorkforce/workforce. |
|
pr-reviewer could not complete review for #240 in AgentWorkforce/workforce. |
Summary
daytona-relayvs credential statusdaytonaFixes AgentWorkforce/cloud#2199.
Test Plan
pnpm --filter @agentworkforce/persona-kit buildpnpm --filter @agentworkforce/deploy test(205 passed)Merge Plan
I will monitor CI and review comments, address actionable feedback, re-run focused tests after changes, and merge only after the latest PR head is green.