Skip to content

[v14] Implement waiting for Connect My Computer node to join cluster#32295

Merged
ravicious merged 1 commit intobranch/v14from
ravicious/v14/backport-30905-wait-node
Sep 21, 2023
Merged

[v14] Implement waiting for Connect My Computer node to join cluster#32295
ravicious merged 1 commit intobranch/v14from
ravicious/v14/backport-30905-wait-node

Conversation

@ravicious
Copy link
Copy Markdown
Member

@ravicious ravicious commented Sep 21, 2023

Backport #30905.

master includes one test that isn't present on v14, so the diff has one less line where I had to add AgentsDir: t.TempDir(),.

* Add daemon.Service.ResolveClusterURI

* Accept agents dir through command line flag

tshd needs to know this out of band, so that when the Electron app tells
it to watch for host UUID file for a specific cluster, the Electron app
can send just the profile name of the cluster instead of an arbitrary path
on the computer.

* Implement WaitForConnectMyComputerNodeJoin in tsh daemon

* wait: Use addEventListener instead of onabort

* Make TshAbortController emit abort event only once

This aligns it with a regular AbortController, which also emits the event
only once.

* Refactor how types are imported in tshd fixtures

* Implement WaitForConnectMyComputerNodeJoin in Electron app

* createAbortController: Add signal.aborted, use emitter.once

* Improve wait function based on Deno implementation

https://github.com/denoland/deno_std/blob/72d6e6641e3cd39ae69fba89a78feab354018ef0/async/delay.ts#L39

* Add a comment about the events package
@github-actions github-actions Bot added backport size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui labels Sep 21, 2023
@ravicious ravicious enabled auto-merge September 21, 2023 12:36
@ravicious ravicious added this pull request to the merge queue Sep 21, 2023
Merged via the queue into branch/v14 with commit 3ac1894 Sep 21, 2023
@ravicious ravicious deleted the ravicious/v14/backport-30905-wait-node branch September 21, 2023 16:52
@fheinecke fheinecke mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants