Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency of etcd from tctl #29377

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

rosstimothy
Copy link
Contributor

@rosstimothy rosstimothy commented Jul 20, 2023

The following import tree resulted in tctl depending on etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common 
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta 
|-----> github.com/gravitational/teleport/lib/services/local 
|-------> github.com/gravitational/teleport/lib/backend/etcdbk 
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend is etcd by using type assertion. A new GetName method is added to backend.Backend so that the storage mechanism can be determined via string comparison instead of importing backend implementations to do type assertion.

The following import tree resulted in tctl importing etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta
|-----> github.com/gravitational/teleport/lib/services/local
|-------> github.com/gravitational/teleport/lib/backend/etcdbk
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend
is etcd by using type assertion. A new GetName method is added
to backend.Backend so that the storage mechanism can be determined
via string comparison instead of importing backend implementations
to do type assertion.
@rosstimothy rosstimothy force-pushed the tross/remove_etcd_dep_from_tctl branch from 82177fb to 685c28e Compare July 20, 2023 21:12
@rosstimothy rosstimothy marked this pull request as ready for review July 20, 2023 22:09
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from r0mant July 20, 2023 22:55
@rosstimothy rosstimothy added this pull request to the merge queue Jul 20, 2023
Merged via the queue into master with commit d84f191 Jul 20, 2023
23 checks passed
@rosstimothy rosstimothy deleted the tross/remove_etcd_dep_from_tctl branch July 20, 2023 23:26
rosstimothy added a commit that referenced this pull request Jul 21, 2023
The following import tree resulted in tctl importing etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta
|-----> github.com/gravitational/teleport/lib/services/local
|-------> github.com/gravitational/teleport/lib/backend/etcdbk
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend
is etcd by using type assertion. A new GetName method is added
to backend.Backend so that the storage mechanism can be determined
via string comparison instead of importing backend implementations
to do type assertion.
rosstimothy added a commit that referenced this pull request Jul 21, 2023
The following import tree resulted in tctl importing etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta
|-----> github.com/gravitational/teleport/lib/services/local
|-------> github.com/gravitational/teleport/lib/backend/etcdbk
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend
is etcd by using type assertion. A new GetName method is added
to backend.Backend so that the storage mechanism can be determined
via string comparison instead of importing backend implementations
to do type assertion.
github-merge-queue bot pushed a commit that referenced this pull request Jul 21, 2023
The following import tree resulted in tctl importing etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta
|-----> github.com/gravitational/teleport/lib/services/local
|-------> github.com/gravitational/teleport/lib/backend/etcdbk
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend
is etcd by using type assertion. A new GetName method is added
to backend.Backend so that the storage mechanism can be determined
via string comparison instead of importing backend implementations
to do type assertion.
github-merge-queue bot pushed a commit that referenced this pull request Jul 21, 2023
The following import tree resulted in tctl importing etcd:

| github.com/gravitational/teleport/tool/tctl
|--> github.com/gravitational/teleport/tool/tctl/common
|---> github.com/gravitational/teleport/lib/auth
|----> github.com/gravitational/teleport/lib/auth/okta
|-----> github.com/gravitational/teleport/lib/services/local
|-------> github.com/gravitational/teleport/lib/backend/etcdbk
|--------> go.etcd.io/etcd/client/v3

This stems from the assistant service which checks if the backend
is etcd by using type assertion. A new GetName method is added
to backend.Backend so that the storage mechanism can be determined
via string comparison instead of importing backend implementations
to do type assertion.
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.

None yet

3 participants