-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat: [M3-8985] - High performance volume indicator #11400
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @dchyrva-akamai!
I'm missing some context on this feature. How do we get the necessary new Linode capability? Is this capability currently being returned on any production Linode with 32GB (or more?) RAM? The screenshots show a 1GB Linode. Are there any customer tags necessary for the new capability?
Following the testing steps, I created a 32GB Linode, attached a volume to that Linode, and was not seeing the new Block Storage Performance B1
returned from the linode's prod API endpoint, so therefore saw no high perf icon. (The same was true in the dev environment.)
Note to fellow reviews: On my prod account, I had to first increase my Reputation in Admin to 100 to be able to create a linode with that plan and avoid encountering an account limit error.
2d66906
to
bf72d0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR! Looks great, I just have one stylistic suggestion
According to the information available to me in the ticket, availability of the There is a chance that the Back-End side of the feature has not been implemented yet, which is why "How to test" section might be misleading at the moment. The screenshots in the "Preview" section were taken from the local environment. |
Hi mjac0bs, most likely the feature has not been rolled out yet on the API side (I'm trying to find out if that's the case). We decided to create a PR for this feature to get early feedback, and also because these are non-breaking changes - there are no visual changes in the UI when |
return ( | ||
isHighPerformanceVolume && ( | ||
<Tooltip arrow title="High Performance"> | ||
<IconButton | ||
sx={{ | ||
border: '1px solid', | ||
borderRadius: '50%', | ||
padding: 0, | ||
}} | ||
> | ||
<BoltIcon sx={{ fontSize: 12 }} /> | ||
</IconButton> | ||
</Tooltip> | ||
) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return ( | |
isHighPerformanceVolume && ( | |
<Tooltip arrow title="High Performance"> | |
<IconButton | |
sx={{ | |
border: '1px solid', | |
borderRadius: '50%', | |
padding: 0, | |
}} | |
> | |
<BoltIcon sx={{ fontSize: 12 }} /> | |
</IconButton> | |
</Tooltip> | |
) | |
); | |
if (!isHighPerformanceVolume) { | |
return null; | |
} | |
return ( | |
<Tooltip arrow title="High Performance"> | |
<IconButton | |
sx={{ | |
border: '1px solid', | |
borderRadius: '50%', | |
padding: 0, | |
}} | |
> | |
<BoltIcon sx={{ fontSize: 12 }} /> | |
</IconButton> | |
</Tooltip> | |
); |
); | ||
} | ||
|
||
export default HighPerformanceVolumeIcon; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this default export and export the function instead. We prefer named exports in our codebase. (docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnussman-akamai Should also be resolved.
linodeCapabilities?: LinodeCapabilities[]; | ||
} | ||
|
||
function HighPerformanceVolumeIcon({ linodeCapabilities }: Props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function HighPerformanceVolumeIcon({ linodeCapabilities }: Props) { | |
export function HighPerformanceVolumeIcon({ linodeCapabilities }: Props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments on spacing and below. Approving pending feedback is addressed; Banks had some good thoughts as well.
We decided to create a PR for this feature to get early feedback, and also because these are non-breaking changes
++ We appreciate this - it's helpful to be able to provide early feedback!
I understand that it's hard to test this feature in this state (an instance object must be altered from the browser console to include Block Storage Performance B1), so we can wait with merging the changes into develop until we know that the API part is ready.
We often mock API data and use our Mock Service Worker dev tool when doing development; I wanted to be sure that was what we'd need to do to test. We can modify code like the linodeSeeder to mock a linode with the new capability.
seedEntities: linodeFactory.buildList(count, {
capabilities: ['Block Storage Performance B1'],
}),
Screen.Recording.2024-12-12.at.9.27.57.AM.mov
I recommend adding test coverage. For example, adding on to our existing VolumeTableRow.test.tsx
:
describe('Volume table row - for linodes detail page', () => {
it('should show a high performance icon tooltip if Linode has the capability', async () => {
const { getByLabelText, getByText } = await renderWithThemeAndRouter(
wrapWithTableBody(
<VolumeTableRow
handlers={handlers}
isDetailsPageRow
linodeCapabilities={['Block Storage Performance B1']}
volume={attachedVolume}
/>
)
);
const highPerformanceIcon = getByLabelText('High Performance');
expect(highPerformanceIcon).toBeVisible();
await userEvent.click(highPerformanceIcon);
await waitFor(() => expect(getByText('High Performance')).toBeVisible());
});
packages/manager/src/features/Linodes/LinodeEntityDetailBody.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodeEntityDetailBody.tsx
Outdated
Show resolved
Hide resolved
014ef0f
to
4f7c53c
Compare
@@ -20,7 +20,7 @@ export interface Linode { | |||
id: number; | |||
alerts: LinodeAlerts; | |||
backups: LinodeBackups; | |||
capabilities?: LinodeCapabilities[]; // @TODO BSE: Remove optionality once BSE is fully rolled out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and pushed f80e9e9 to improve some types. I also removed the optionality here.
@dwiley-akamai @hkhalil-akamai Do you guys think this change is okay? From what I can see, capabilities
is fully rolled out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should be good to go with that. I'll circle back to review other instances as part of M3-8405
@@ -20,7 +20,7 @@ export interface Linode { | |||
id: number; | |||
alerts: LinodeAlerts; | |||
backups: LinodeBackups; | |||
capabilities?: LinodeCapabilities[]; // @TODO BSE: Remove optionality once BSE is fully rolled out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should be good to go with that. I'll circle back to review other instances as part of M3-8405
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed a couple more things.
(And pushed updates for them in cd87815. cc @dchyrva-akamai )
packages/manager/src/features/Linodes/HighPerformanceVolumeIcon.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/HighPerformanceVolumeIcon.tsx
Outdated
Show resolved
Hide resolved
Cloud Manager UI test results🔺 1 failing test on test run #8 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: yarn cy:run -s "cypress/e2e/core/linodes/smoke-delete-linode.spec.ts" |
That's very useful, thanks for sharing! |
Feedback has been addressed and the last CI run had a test failure that is unrelated to this PR - looks like flake. I'm going to merge this now. Thanks @dchyrva-akamai and @skulpok-akamai 🚀 |
Cloud Manager E2E Run #6975
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Failed #6975
|
Run duration | 29m 41s |
Commit |
b703190465: feat: [M3-8985] - High performance volume indicator (#11400)
|
Committer | Dmytro Chyrva |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
1
|
Flaky |
0
|
Pending |
2
|
Skipped |
0
|
Passing |
465
|
View all changes introduced in this branch ↗︎ |
Tests for review
cypress/e2e/core/linodes/clone-linode.spec.ts • 1 failed test
Test | Artifacts | |
---|---|---|
clone linode > can clone a Linode from Linode details page |
Screenshots
Video
|
Description 📝
Added high performance volume indicator to the Linode details panel and Linode volumes table.
Changes 🔄
Preview 📷
How to test 🧪
As an Author, to speed up the review process, I considered 🤔
👀 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
As an Author, before moving this PR from Draft to Open, I confirmed ✅