Skip to content

[v13] Spawn gateway CLI client directly#26751

Merged
ravicious merged 3 commits intobranch/v13from
ravicious/v13/backport-db-cli
May 25, 2023
Merged

[v13] Spawn gateway CLI client directly#26751
ravicious merged 3 commits intobranch/v13from
ravicious/v13/backport-db-cli

Conversation

@ravicious
Copy link
Copy Markdown
Member

Backport #26441, #26705, #26581.

ravicious added 3 commits May 24, 2023 15:33
* 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
@ravicious ravicious force-pushed the ravicious/v13/backport-db-cli branch from ba2a878 to 4e69cc1 Compare May 24, 2023 13:33
@ravicious ravicious marked this pull request as ready for review May 24, 2023 13:50
@github-actions github-actions Bot requested review from avatus, gzdunek and ryanclark May 24, 2023 13:50
@ravicious ravicious added this pull request to the merge queue May 25, 2023
Merged via the queue into branch/v13 with commit e3cde9d May 25, 2023
@ravicious ravicious deleted the ravicious/v13/backport-db-cli branch May 25, 2023 15:37
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants