Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

useDocumentGateway: Pin shell to correct cluster #812

Merged
merged 2 commits into from
May 5, 2022

Conversation

ravicious
Copy link
Member

Closes gravitational/webapps.e#269.

Commit b5d30b1 fixed some reconnect issues, but it also introduced a
locally scoped cluster variable. This made it seem like it's the cluster
to which the given gateway belongs, but it was actually the root cluster.

This commit renames the old cluster variable to rootCluster. It also
makes sure that workspaceDocumentsService.openNewTerminal receives
correct root & leaf cluster IDs.

Commit b5d30b1 fixed some reconnect issues, but it also introduced a
locally scoped `cluster` variable. This made it seem like it's the cluster
to which the given gateway belongs, but it was actually the root cluster.

This commit renames the old `cluster` variable to `rootCluster`. It also
makes sure that `workspaceDocumentsService.openNewTerminal` receives
correct root & leaf cluster IDs.
@ravicious ravicious requested a review from gzdunek May 5, 2022 14:24
@ravicious
Copy link
Member Author

Also, @gzdunek do you know when rootCluster can be nil? Lisa asked about this here: #763 (comment)

It seems to me that there should be no situation in which the root cluster is nil, since if you remove (log out of) a root cluster, we remove all its resources as well?

@gzdunek
Copy link
Contributor

gzdunek commented May 5, 2022

AFAIK there should be no situation when rootCluster is nil

@ravicious
Copy link
Member Author

Ok, I'll remove those checks in a separate PR then so that we can safely backport this one to 1.0.1.

@ravicious ravicious merged commit 7b9fd1c into master May 5, 2022
@ravicious ravicious deleted the ravicious/gateway-cli-command-shell branch May 5, 2022 15:25
ravicious added a commit that referenced this pull request May 5, 2022
Commit b5d30b1 fixed some reconnect issues, but it also introduced a
locally scoped `cluster` variable. This made it seem like it's the cluster
to which the given gateway belongs, but it was actually the root cluster.

This commit renames the old `cluster` variable to `rootCluster`. It also
makes sure that `workspaceDocumentsService.openNewTerminal` receives
correct root & leaf cluster IDs.
ravicious added a commit that referenced this pull request May 5, 2022
Commit b5d30b1 fixed some reconnect issues, but it also introduced a
locally scoped `cluster` variable. This made it seem like it's the cluster
to which the given gateway belongs, but it was actually the root cluster.

This commit renames the old `cluster` variable to `rootCluster`. It also
makes sure that `workspaceDocumentsService.openNewTerminal` receives
correct root & leaf cluster IDs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants