-
Notifications
You must be signed in to change notification settings - Fork 14
Add Heartbeat #4
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
Conversation
cc @akosyakov |
I think you don't need to care here. The test case will be:
|
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.
It looks like a right direction, but we don't respect workspace lifecycle yet.
I opened gitpod-io/gitpod#11021 since I needed to rerun werft job. |
It looks great, only tracking of workspace running state is missing that we don't send events if workspace is not running. |
It looks almost there, some tweak are needed for heatbeating code. @mustard-mh @andreafalzetti since I'm away till next Monday, could you help to finish with testing after another round of changes? 🙏 |
I think logic looks well. Could someone help with testing and giving another look at it? 🙏 cc @mustard-mh @andreafalzetti |
Tested, and it works well. But extension requests auth twice when I'm testing. I'll update
|
After exec
The test VSCode Desktop window closed, don't know if |
src/remoteConnector.ts
Outdated
// Check for gitpod remote extension version to avoid sending heartbeat in both extensions at the same time | ||
const gitpodRemoteVersion = await getGitpodRemoteVersion(); | ||
if (gitpodRemoteVersion && semver.gte(gitpodRemoteVersion, '0.0.40')) { | ||
const session = await this.getGitpodSession(connectionInfo.gitpodHost); |
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.
Should we use same session above?
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.
Nope, vscode takes care of returning the same session if the scopes are the same, also this code will execute in a new window/after reload when it's connecting to a remote workspace, and the previous code only gets executed when opening a callback uri
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.
code LGTM
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.
🚀
Could you do another test 🙏 I updated the test steps |
We can disable computer's network to test |
sounds good, please update the tracking plan as usual 🙏 |
src/remoteConnector.ts
Outdated
await this.context.globalState.update(`${RemoteConnector.SSH_DEST_KEY}${sshDestStr}`, { ...connectionInfo, isFirstConnection: false }); | ||
|
||
// Check for gitpod remote extension version to avoid sending heartbeat in both extensions at the same time | ||
const isGitpodRemoteHeartbeatCancelled = await cancelGitpodRemoteHeartbeat(); |
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.
I'm not sure about it. We see that remote-ssh-extension fails to install right now very often. If we do it then heartbeat is missing.
I am having issues to connect to the workspace. Any idea? 🤔
|
You need to create a new prev env, the one I posted got merged |
Move heartbeat to gitpod-desktop from gitpod-remote
How to test:
function:sendHeartBeat
scope gitpod#11021).zip
file to workspace, unzip it.vsix
file and install it__gitpod.cancelGitpodRemoteHeartbeat command executed
is logged in the gitpod-remote logsNot sure how to trigger ssh reconnection🤔Maybe use
sudo killall sshd
, but window closed after sshd terminate, not sure if it works