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

update access request errors to not repeat cluster names #49600

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

stevenGravy
Copy link
Contributor

@stevenGravy stevenGravy commented Nov 30, 2024

Currently Teleport will repeat the same invalid cluster name with access requests error message. This updates to output only the unique cluster names.

from

$ tsh request create --resource /teleport.example.com/node/e5409159-f127-46e2-a8fb-1f4515573f8f --resource /teleport.example.com/node/e5409159-f127-46e2-a8fb-1f4515573f8a --resource /othercluster.example.com/node/e5409159-f127-46e2-a8fb-1f4515573f8c --resource /teleport.example.com/node/e5409159-f127-46e2-a8fb-1f4515573f8e
Creating request...
ERROR: access request contains invalid or unknown cluster names: teleport.example.com, teleport.example.com, othercluster.example.com, teleport.example.com

to just the unique invalid cluster names

Creating request...
ERROR: access request contains invalid or unknown cluster names: othercluster.example.com, teleport.example.com

@stevenGravy stevenGravy added error-msg Improving customer facing error messages. no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 backport/branch/v16 backport/branch/v17 labels Nov 30, 2024
@github-actions github-actions bot requested review from jimbishopp and zmb3 November 30, 2024 16:19
lib/services/access_request.go Outdated Show resolved Hide resolved
@stevenGravy stevenGravy added this pull request to the merge queue Dec 2, 2024
Merged via the queue into master with commit fa1fa40 Dec 2, 2024
40 checks passed
@stevenGravy stevenGravy deleted the stevenGravy/invalidclusternameerror branch December 2, 2024 16:01
@public-teleport-github-review-bot

@stevenGravy See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v15 backport/branch/v16 backport/branch/v17 error-msg Improving customer facing error messages. no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants