-
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
CHE-4098: separate terminal and exec agents #4486
Conversation
Refactor golang terminal code. Add ping frames into terminal websocket connection. Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2230/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2236/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2245/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build # 2254 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2254/ to view the results. |
Signed-off-by: Alexander Garagatyi <[email protected]>
Signed-off-by: Alexander Garagatyi <[email protected]>
@@ -846,7 +846,7 @@ setupSSHKeys(workspaceDto: org.eclipse.che.api.workspace.shared.dto.WorkspaceDto | |||
let promises : Array<Promise<any>> = new Array<Promise<any>>(); | |||
let workspaceCommands : Array<any> = workspaceDto.getConfig().getCommands(); | |||
|
|||
// get terminal URI | |||
// get exec-agent URI | |||
let execAgentServer = workspaceDto.getRuntime().getDevMachine().getRuntime().getServers().get("4411/tcp"); |
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.
Maybe port should be 4412?
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.
Yep, good catch!
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.
Fixed
Signed-off-by: Alexander Garagatyi <[email protected]>
Signed-off-by: Alexander Garagatyi <[email protected]>
@bmicklea I added release notes. Feel free to change them as you want. |
http.Handler | ||
} | ||
|
||
type routerImpl struct { |
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 think it makes more sense to create a separate go file and move httprouter
based implementation there + add routes registration to the contract of the Router
interface.
) | ||
|
||
// BasePathChopper cuts base path of a request | ||
type BasePathChopper struct { |
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 is kind of workaround for the httprouter
implementation.
The previous (gorilla mux) based router could deal with regexp in paths, which didn't require such workaround,
i think it makes sense to make this code Router
implementation specific
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2268/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
@evoevodin I've commited changes to adress your comments |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2274/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2275/ |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2277/ |
Great job, @garagatyi! |
Signed-off-by: Alexander Garagatyi <[email protected]>
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2282/ |
Refactor golang terminal code. Add ping frames into terminal websocket connection. Signed-off-by: Alexander Garagatyi <[email protected]>
Refactor golang terminal code. Add ping frames into terminal websocket connection. Signed-off-by: Alexander Garagatyi <[email protected]>
What does this PR do?
Separate terminal and exec agents.
Refactor golang terminal code.
Add ping frames into terminal websocket connection.
What issues does this PR fix or reference?
Fixes #4098
Fixes #4159
Fixes #3253
Changelog
Separated terminal and exec agents.
Fix terminal disconnects due to request timeout behind a proxy.
Fix terminal failure after regular HTTP request to a websocket entrypoint.
Release Notes
We have separated the terminal and exec agents in this release to make behaviors clearer and give users the freedom to control whether terminal, command execution or both are required for their machines.
In order to provide a smooth transition period the REST API services will automatically add the exec agent into every machine that has a terminal agent for the next two releases. This temporary service will be removed in 5.8.0. At that point any machines that do not have an exec agent added will be unable to have commands executed against them.
You can add the terminal and/or exec agent to your machine through the user dashboard in the Workspace detail view, or via the workspace API.
We have also fixed a bug in the terminal that would cause the terminal to become disconnected when a request timed out behind a proxy. Terminal and exec agents now send ping frames to clients to prevent this disconnection issue.
Docs PR