Skip to content

Commit 979ba51

Browse files
authored
Feat: configurable deploy timeouts (#1519)
* make deploy timeout configurable * increase default deploy timeout to 8 minutes
1 parent 364ea56 commit 979ba51

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

apps/webapp/app/env.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ const EnvironmentSchema = z.object({
142142
CONTAINER_REGISTRY_PASSWORD: z.string().optional(),
143143
DEPLOY_REGISTRY_HOST: z.string().optional(),
144144
DEPLOY_REGISTRY_NAMESPACE: z.string().default("trigger"),
145+
DEPLOY_TIMEOUT_MS: z.coerce
146+
.number()
147+
.int()
148+
.default(60 * 1000 * 8), // 8 minutes
145149
OBJECT_STORE_BASE_URL: z.string().optional(),
146150
OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(),
147151
OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(),

apps/webapp/app/v3/services/indexDeployment.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class IndexDeploymentService extends BaseService {
5050
deployment.id,
5151
"DEPLOYING",
5252
"Could not index deployment in time",
53-
new Date(Date.now() + 180_000)
53+
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
5454
);
5555

5656
const responses = await socketIo.providerNamespace.timeout(30_000).emitWithAck("INDEX", {

apps/webapp/app/v3/services/initializeDeployment.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class InitializeDeploymentService extends BaseService {
6464
deployment.id,
6565
"BUILDING",
6666
"Building timed out",
67-
new Date(Date.now() + 180_000) // 3 minutes
67+
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
6868
);
6969

7070
const imageTag = `${payload.namespace ?? env.DEPLOY_REGISTRY_NAMESPACE}/${

0 commit comments

Comments
 (0)