-
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] Refactor Bridge.controlInstances and add tracing (4/5) #10727
Conversation
f444050
to
59c02a3
Compare
59c02a3
to
c22d66d
Compare
); | ||
|
||
disconnectStarted = Number.MAX_SAFE_INTEGER; // Reset disconnect period | ||
} catch (err) { |
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.
This inner try-catch is preparation for a followup PR.
|
||
const runningInstances = await this.workspaceDB.trace(ctx).findRunningInstancesWithWorkspaces(installation); |
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.
There are three changes in this method:
- swapped local
findRunningInstancesWithWorkspaces
with external call - added span (and thus: try-catch to finish() it)
- extraction of
markWorkspaceInstanceAsStopped
started the job as gitpod-build-gpl-9395-stuck-prebuilds-4.7 because the annotations in the pull request description changed |
Description
This PR prepares for fixing a bug with prebuilds being stuck in
queued
indefinitely in rare cases. (4/5 in the chain)To that end, if mostly refactors the method
controlInstances
inBridge
, and adds tracing to it.Related Issue(s)
Context: #9395
Follow-up: #10882
How to test
./dev/preview/install-k3s-kubeconfig.sh
ws-manager-bridge
:gpctl debug log ws-manager-bridge
Release Notes
Documentation