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

Add improvements for the EKS Discover UI. #38609

Merged
merged 4 commits into from
Feb 27, 2024
Merged

Conversation

AntonAM
Copy link
Contributor

@AntonAM AntonAM commented Feb 26, 2024

This PR adds a few small improvements to the Discover EKS flow -

  • Add a note informing user about access entries auth mode requirements
  • Change label text for the manual instructions.
  • If we encounter an error about agent already installed on the cluster, just skip to the step 2 "waiting" (there's small time window when this can happen).

@AntonAM AntonAM added the no-changelog Indicates that a PR does not require a changelog entry label Feb 26, 2024
@AntonAM AntonAM requested a review from kimlisa February 26, 2024 02:17
@github-actions github-actions bot requested review from avatus and rudream February 26, 2024 02:17
Comment on lines 222 to 225
result.error &&
!result.error.message.includes(
'teleport-kube-agent is already installed'
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this have any specific error code we could check for instead?

Copy link
Contributor

@rudream rudream Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking for error code as Michael suggested is ideal, but if we're going to check for a substring in an error message, we should make sure to leave a note where the error message in defined in the backend saying that it needs to be kept in sync with this. This way if someone changes the error message, this won't break.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, it's not an AWS error, just our internal message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a comment 👍

@@ -293,6 +298,17 @@ export function EnrollEksCluster(props: AgentStepProps) {
{fetchClustersAttempt.status === 'failed' && !hasIamPermError && (
<Danger mt={3}>{fetchClustersAttempt.statusText}</Danger>
)}
<Text mt={4} mb={-3}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of the negative value here? are we doing it to try and not affect the positioning of something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from RDS discover where we use similar styled note, I think it's just to make margin to look better

Negative margin:
image

vs 0 margin

image

Not really sure which one looks better, I can remove negative margin if you think it's not needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a nit at this point so feel free to ignore, but it'd probably make more sense to reduce the mt of the element right below it (the Select the AWS Region... Text element) than to use negative margin here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, changed the margins 👍

Comment on lines 222 to 225
result.error &&
!result.error.message.includes(
'teleport-kube-agent is already installed'
)
Copy link
Contributor

@rudream rudream Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking for error code as Michael suggested is ideal, but if we're going to check for a substring in an error message, we should make sure to leave a note where the error message in defined in the backend saying that it needs to be kept in sync with this. This way if someone changes the error message, this won't break.

@AntonAM AntonAM force-pushed the anton/eks-ui-improvements branch from e0ff679 to 093e8e0 Compare February 26, 2024 20:40
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from kimlisa February 27, 2024 17:42
@AntonAM AntonAM added this pull request to the merge queue Feb 27, 2024
Merged via the queue into master with commit e33746d Feb 27, 2024
40 checks passed
@AntonAM AntonAM deleted the anton/eks-ui-improvements branch February 27, 2024 18:21
@public-teleport-github-review-bot

@AntonAM See the table below for backport results.

Branch Result
branch/v15 Create PR

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

Successfully merging this pull request may close these issues.

4 participants