Skip to content

Commit 6850a78

Browse files
author
Laurie T. Malau
committed
Use in config
1 parent e6f50f7 commit 6850a78

File tree

14 files changed

+44
-24
lines changed

14 files changed

+44
-24
lines changed

components/ws-manager-bridge/src/bridge.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,17 @@ export class WorkspaceManagerBridge implements Disposable {
512512
// When ws-manager is not aware of the following instances outside of the timeout duration,
513513
// they should be marked as stopped.
514514
if (
515-
(phase === "pending" && durationLongerThanSeconds(Date.parse(instance.creationTime), 3600)) ||
515+
(phase === "pending" &&
516+
durationLongerThanSeconds(
517+
Date.parse(instance.creationTime),
518+
this.config.timeouts.maxInstanceDuration,
519+
)) ||
516520
(phase === "stopping" &&
517521
instance.stoppingTime &&
518-
durationLongerThanSeconds(Date.parse(instance.stoppingTime), 3600))
522+
durationLongerThanSeconds(
523+
Date.parse(instance.stoppingTime),
524+
this.config.timeouts.maxInstanceDuration,
525+
))
519526
) {
520527
log.info(
521528
{ instanceId, workspaceId: instance.workspaceId },

components/ws-manager-bridge/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export interface Configuration {
3131
preparingPhaseSeconds: number;
3232
buildingPhaseSeconds: number;
3333
unknownPhaseSeconds: number;
34+
maxInstanceDuration: number;
3435
};
3536

3637
// emulatePreparingIntervalSeconds configures how often we check for Workspaces in phase "preparing" for clusters we do not govern

install/installer/cmd/testdata/render/aws-setup/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/azure-setup/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/customization/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/external-registry/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/gcp-setup/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/http-proxy/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/insecure-s3-setup/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/minimal/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/statefulset-customization/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/use-pod-security-policies/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/workspace-requests-limits/output.golden

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/pkg/components/ws-manager-bridge/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type Timeouts struct {
2626
PreparingPhaseSeconds int32 `json:"preparingPhaseSeconds"`
2727
BuildingPhaseSeconds int32 `json:"buildingPhaseSeconds"`
2828
UnknownPhaseSeconds int32 `json:"unknownPhaseSeconds"`
29+
MaxInstanceDuration int32 `json:"maxInstanceDuration"`
2930
}
3031

3132
// WorkspaceCluster from components/gitpod-protocol/src/workspace-cluster.ts

0 commit comments

Comments
 (0)