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

fix: [M3-7605] - Wrong status indicator when provisioning a LKE #10320

Merged

Conversation

hana-linode
Copy link
Contributor

@hana-linode hana-linode commented Mar 27, 2024

Description πŸ“

Fix the status icon indicator when a Kubernetes Linode is provisioning from grey to pulsing orange. I also went ahead and did some styling/file cleanup.

Preview πŸ“·

Before After
Screenshot 2024-03-27 at 10 38 24 AM
Screen.Recording.2024-03-27.at.10.36.48.AM.mov

How to test πŸ§ͺ

Reproduction steps

(How to reproduce the issue, if applicable)

  • On develop or prod, create a new Kubernetes cluster and observe the grey provisioning Linode icon status in the details page

Verification steps

(How to verify changes)

  • Create a new Kubernetes cluster and observe the pulsing orange provisioning Linode icon status in the details page
  • Ensure there are no visual regressions from the code clean up

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@hana-linode hana-linode added Bug Fixes for regressions or bugs LKE Related to Linode Kubernetes Engine offerings labels Mar 27, 2024
@hana-linode hana-linode self-assigned this Mar 27, 2024
Comment on lines +57 to +58
nodeStatus === 'not_ready'
? 'other'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the actual fix

import { useInProgressEvents } from 'src/queries/events/events';

import NodeActionMenu from './NodeActionMenu';
import { StyledCopyTooltip, StyledTableRow } from './NodeTable.styles';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was basically migrated from NodeTable along with some styling migration

@hana-linode hana-linode marked this pull request as ready for review March 27, 2024 15:44
@hana-linode hana-linode requested a review from a team as a code owner March 27, 2024 15:44
@hana-linode hana-linode requested review from bnussman-akamai and cpathipa and removed request for a team March 27, 2024 15:44
Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

Overall LGTM! left minor comments for code improvements.

  • Created a new Kubernetes cluster and confirming the pulsing orange provisioning icon status.
  • No visual regressions found.

? 'Provisioning'
: transitionText(instanceStatus ?? '', instanceId ?? -1, recentEvent);

const displayIP = ip ?? '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need direct usage of ip instead of displayIP? Since we are conditionally rendering the consumers of displayIP, which will handle undefined cases, can we directly use ip?

Comment on lines +53 to +61
const nodeReadyAndInstanceRunning =
nodeStatus === 'ready' && instanceStatus === 'running';

const iconStatus =
nodeStatus === 'not_ready'
? 'other'
: nodeReadyAndInstanceRunning
? 'active'
: 'inactive';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we simplify the determination of iconStatus by directly incorporating the conditions?

  const iconStatus =
    nodeStatus === 'not_ready'
      ? 'other'
      : nodeStatus === 'ready' && instanceStatus === 'running'
      ? 'active'
      : 'inactive';

@hana-linode hana-linode merged commit 3ed6b48 into linode:develop Mar 28, 2024
17 checks passed
@hana-linode hana-linode deleted the M3-7605-wrong-status-indicator-lke branch March 28, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixes for regressions or bugs LKE Related to Linode Kubernetes Engine offerings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants