Skip to content

Commit 564a692

Browse files
geroplroboquat
authored andcommitted
[bridge] Remove timeout for 'stopping', as that is responsibility of ws-manager
1 parent 52a42c3 commit 564a692

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ export class WorkspaceManagerBridge implements Disposable {
518518
* - preparing
519519
* - building
520520
* It also covers these phases, as fallback, when - for whatever reason - we no longer receive updates from ws-manager.
521-
* - stopping (as fallback, in case ws-manager is stopped to early: configure to be >= then ws-manager timeouts!)
522521
* - unknown (fallback)
523522
*/
524523
protected async controlInstancesTimeouts(parentCtx: TraceContext, runningInstances: RunningWorkspaceInfo[]) {
@@ -552,25 +551,20 @@ export class WorkspaceManagerBridge implements Disposable {
552551
try {
553552
const now = Date.now();
554553
const creationTime = new Date(info.latestInstance.creationTime).getTime();
555-
const stoppingTime = new Date(info.latestInstance.stoppingTime ?? now).getTime(); // stoppingTime only set if entered stopping state
556554
const timedOutInPreparing = now >= creationTime + this.config.timeouts.preparingPhaseSeconds * 1000;
557555
const timedOutInBuilding = now >= creationTime + this.config.timeouts.buildingPhaseSeconds * 1000;
558-
const timedOutInStopping = now >= stoppingTime + this.config.timeouts.stoppingPhaseSeconds * 1000;
559556
const timedOutInUnknown = now >= creationTime + this.config.timeouts.unknownPhaseSeconds * 1000;
560557
const currentPhase = info.latestInstance.status.phase;
561558

562559
log.debug(logContext, "Controller: Checking for instances in the DB to mark as stopped", {
563560
creationTime,
564-
stoppingTime,
565561
timedOutInPreparing,
566-
timedOutInStopping,
567562
currentPhase,
568563
});
569564

570565
if (
571566
(currentPhase === "preparing" && timedOutInPreparing) ||
572567
(currentPhase === "building" && timedOutInBuilding) ||
573-
(currentPhase === "stopping" && timedOutInStopping) ||
574568
(currentPhase === "unknown" && timedOutInUnknown)
575569
) {
576570
log.info(logContext, "Controller: Marking workspace instance as stopped", {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export interface Configuration {
3030
timeouts: {
3131
preparingPhaseSeconds: number;
3232
buildingPhaseSeconds: number;
33-
stoppingPhaseSeconds: number;
3433
unknownPhaseSeconds: number;
3534
};
3635

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2727
Timeouts: Timeouts{
2828
PreparingPhaseSeconds: 3600,
2929
BuildingPhaseSeconds: 3600,
30-
StoppingPhaseSeconds: 3600,
3130
UnknownPhaseSeconds: 600,
3231
},
3332
EmulatePreparingIntervalSeconds: 10,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type ClusterService struct {
2424
type Timeouts struct {
2525
PreparingPhaseSeconds int32 `json:"preparingPhaseSeconds"`
2626
BuildingPhaseSeconds int32 `json:"buildingPhaseSeconds"`
27-
StoppingPhaseSeconds int32 `json:"stoppingPhaseSeconds"`
2827
UnknownPhaseSeconds int32 `json:"unknownPhaseSeconds"`
2928
}
3029

0 commit comments

Comments
 (0)