Skip to content

Feat: configurable deploy timeouts #1519

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

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/webapp/app/env.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ const EnvironmentSchema = z.object({
CONTAINER_REGISTRY_PASSWORD: z.string().optional(),
DEPLOY_REGISTRY_HOST: z.string().optional(),
DEPLOY_REGISTRY_NAMESPACE: z.string().default("trigger"),
DEPLOY_TIMEOUT_MS: z.coerce
.number()
.int()
.default(60 * 1000 * 8), // 8 minutes
OBJECT_STORE_BASE_URL: z.string().optional(),
OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(),
OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(),
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/app/v3/services/indexDeployment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class IndexDeploymentService extends BaseService {
deployment.id,
"DEPLOYING",
"Could not index deployment in time",
new Date(Date.now() + 180_000)
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
);

const responses = await socketIo.providerNamespace.timeout(30_000).emitWithAck("INDEX", {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/app/v3/services/initializeDeployment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class InitializeDeploymentService extends BaseService {
deployment.id,
"BUILDING",
"Building timed out",
new Date(Date.now() + 180_000) // 3 minutes
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
);

const imageTag = `${payload.namespace ?? env.DEPLOY_REGISTRY_NAMESPACE}/${
Expand Down
Loading