-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[bridge] Introduce AppClusterWorkspaceInstanceController #13831
Conversation
started the job as gitpod-build-gpl-6770-app-gc.2 because the annotations in the pull request description changed |
76e0726
to
287cb5a
Compare
287cb5a
to
977c44d
Compare
log.info("Controlling app cluster instances", { installation: appClusterInstallation }); | ||
|
||
const notStoppedInstances = await this.workspaceDb.findRunningInstancesWithWorkspaces( | ||
appClusterInstallation, | ||
undefined, | ||
false, | ||
); | ||
await this.workspaceInstanceController.controlNotStoppedAppClusterManagedInstanceTimeouts( | ||
ctx, | ||
notStoppedInstances, | ||
appClusterInstallation, | ||
); | ||
|
||
log.info("Done controlling app cluster instances", { | ||
installation: appClusterInstallation, | ||
instancesCount: notStoppedInstances.length, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. This would be the perfect place to put any metrics which report duration & outcome. Shame we don't have metrics configured for ws-manager-bridge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could "cheat" and attach the duration of the run (and any outcome) to the log fields.
|
||
@inject(WorkspaceDB) protected readonly workspaceDb: WorkspaceDB; | ||
|
||
@inject(WorkspaceInstanceController) protected readonly workspaceInstanceController: WorkspaceInstanceController; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we eventually move this instance onto this controller also? Seems we've got layers here which may not be adding immediate value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we could! It's basically and artifact of splitting the PRs, and not adjusting after the rebase 😆
Description
Introduces
AppClusterWorkspaceInstanceController
to garbage-collect workspace instance that failed to start on the application cluster side of the instance lifecycle:Related Issue(s)
Prerequisite: #13866
Contributes to: #6770
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide