[v11] Spawn gateway CLI client directly#26755
Merged
ravicious merged 4 commits intobranch/v11from May 26, 2023
Merged
Conversation
* Create dedicated functions for connecting to resources * Do not use spread operator * Rename `connectToNode` -> `connectToServer` * Remove unused imports
* Return os.exec.Cmd as gateway CLI command * Remove separate Props type from DocumentTerminal * Refactor Kind type exported from documentsService * Export makeRuntimeSettings from MainProcess mock * PtyProcess: Join args in logger name * ptyHostService: Pass ptyOptions explicitly instead of using spread I noticed that we pass both argsList and args to the PtyProcess constructor. While TypeScript allows that, it is a bit confusing when inspecting the actual values received in the constructor. * Add empty DocumentGatewayCliClient * Start terminal from DocumentGatewayCliClient * Add waiting state for DocumentGatewayCliClient * Remove targetSubresourceName from DocumentGatewayCliClient title
* Add onStartError to PTY process * Add logging to frontend PtyEventsStreamHandler * Return cleanup functions from pty process onEvent functions * Extract DocumentReconnect from DocumentTerminal The Reconnect component will be useful when handling startError. * Add getPtyId to PtyProcess This will act as the key for the Terminal component, allowing us to make sure we mount it only once for any given PTY process. * Capture startError and display an error state * Terminal/ctrl: Cleanup ptyProcess onData listener * Include command name and args in startError error message * Remove ptyId field from PtyProcess
3d47d15 to
ecf133b
Compare
avatus
approved these changes
May 24, 2023
gzdunek
approved these changes
May 25, 2023
Contributor
gzdunek
left a comment
There was a problem hiding this comment.
Tested, everything looks fine.
ryanclark
approved these changes
May 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #26441, #26705, #26581.
I also had to backport #24445 since
DocumentGatewayCliClientdepends onconnectToDatabase. I removed any references to document origin since it was not backported to v12. I tested the connectivity to all three supported resource kinds but I'd appreciate a double check on that.Another thing to take care of was theme colors since they weren't backported to v11. Fortunately, as far as I can see only the last commit uses a color and it was trivial to use the old name for it.