Skip to content

daemon.Service: Rename GetCluster to ResolveFullCluster#19180

Merged
ravicious merged 2 commits intomasterfrom
ravicious/rename-get-cluster
Dec 8, 2022
Merged

daemon.Service: Rename GetCluster to ResolveFullCluster#19180
ravicious merged 2 commits intomasterfrom
ravicious/rename-get-cluster

Conversation

@ravicious
Copy link
Copy Markdown
Member

daemon.Service.GetCluster was added in #17497. On the initial load of Connect, we needed to check if the cluster supports access requests so that we can show the UI responsible for managing them. To do that, we had to make a request to the cluster as that information couldn't have been read from the user cert. So the old ResolveCluster method which just read data from the disk wasn't enough.

In b398e0306 in #17950 I expanded the comment for ResolveCluster and GetCluster to highlight the difference between them. During code review, @AntonAM suggested renaming ResolveCluster to ResolveClusterFromStorage. I thought it was a good idea but ResolveCluster was used in quite a few places so I didn't want to add more noise to that PR.

Now I came back to rename the method. But I realized that instead of renaming ResolveCluster, which is the default that's used in multiple places in lib/teleterm, I should rename GetCluster instead to highlight that it does something different.

@ravicious ravicious enabled auto-merge (squash) December 8, 2022 15:16
@ravicious ravicious merged commit aae077a into master Dec 8, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 8, 2022

@ravicious See the table below for backport results.

Branch Result
branch/v11 Failed

@ravicious ravicious deleted the ravicious/rename-get-cluster branch December 8, 2022 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants