Skip to content

Commit aa1e124

Browse files
thomasballingerConvex, Inc.
authored andcommitted
Add silent WorkOS bail-out for the future (#41218)
GitOrigin-RevId: 4865444d328c8e3964d8ee8e3aa84699b21fdbc6
1 parent 33c7ffe commit aa1e124

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/cli/lib/workos/platformApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export async function getDeploymentCanProvisionWorkOSEnvironments(
2929
): Promise<{
3030
teamId: number;
3131
hasAssociatedWorkosTeam: boolean;
32+
disabled?: boolean;
3233
}> {
3334
return bigBrainAPI({
3435
ctx,

src/cli/lib/workos/workos.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ export async function ensureWorkosEnvironmentProvisioned(
6262
}
6363

6464
// We need to provision an environment. Let's figure out if we can:
65-
const { hasAssociatedWorkosTeam, teamId } =
65+
const { hasAssociatedWorkosTeam, teamId, disabled } =
6666
await getDeploymentCanProvisionWorkOSEnvironments(ctx, deploymentName);
6767

68+
if (disabled) {
69+
return "choseNotToAssociatedTeam";
70+
}
71+
6872
if (!hasAssociatedWorkosTeam) {
6973
const result = await tryToCreateAssociatedWorkosTeam(
7074
ctx,

0 commit comments

Comments
 (0)