Skip to content

Commit 93b1a59

Browse files
authored
fix: [UIE: 10232] - Show the Blackwell Limited Availability Banner only for Blackwell Enabled customers (#13414)
* plans table fix * Added changeset: Show the Blackwell Limited Availability Banner only for Blackwell Enabled customers * fix linting warnings * fix e2e test to not expect blackwell no availability error for default customers
1 parent b0df5d3 commit 93b1a59

File tree

4 files changed

+104
-9
lines changed

4 files changed

+104
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Show the Blackwell Limited Availability Banner only for Blackwell Enabled customers ([#13414](https://github.com/linode/manager/pull/13414))

packages/manager/cypress/e2e/core/linodes/plan-selection.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ const GPU_GENERAL_AVAILABILITY_NOTICE =
147147
'New GPU instances are now generally available. Deploy an RTX 4000 Ada GPU instance in select core compute regions in North America, Europe, and Asia.';
148148
const GPU_NO_AVAILABILITY_ERROR =
149149
'GPU Plans are not currently available in this region.';
150-
const GPU_BLACKWELL_NO_AVAILABILITY_ERROR =
151-
'NVIDIA RTX PRO 6000 Blackwell GPU plans are currently unavailable in this region or globally unavailable. Try another region or contact Support for assistance.';
152150

153151
authenticate();
154152
describe('displays linode plans panel based on availability', () => {
@@ -410,12 +408,10 @@ describe('displays specific linode plans for GPU', () => {
410408
//
411409
// - General availability notice explaining that Nvidia Ada plans are available.
412410
// - Region availability error explaining that GPU plans are unavailable in the mocked region.
413-
// - Blackwell GPU availability error explaining that Blackwell plans are unavailable.
414411
cy.findByText('GPU').click();
415412
cy.get(linodePlansPanel).within(() => {
416413
cy.contains(GPU_GENERAL_AVAILABILITY_NOTICE).should('be.visible');
417414
cy.contains(GPU_NO_AVAILABILITY_ERROR).should('be.visible');
418-
cy.contains(GPU_BLACKWELL_NO_AVAILABILITY_ERROR).should('be.visible');
419415
cy.get(notices.unavailable).should('be.visible');
420416

421417
cy.findByRole('table', {
@@ -457,12 +453,10 @@ describe('displays specific kubernetes plans for GPU', () => {
457453
//
458454
// - General availability notice explaining that Nvidia Ada plans are available.
459455
// - Region availability error explaining that GPU plans are unavailable in the mocked region.
460-
// - Blackwell GPU availability error explaining that Blackwell plans are unavailable.
461456
cy.findByText('GPU').click();
462457
cy.get(k8PlansPanel).within(() => {
463458
cy.contains(GPU_GENERAL_AVAILABILITY_NOTICE).should('be.visible');
464459
cy.contains(GPU_NO_AVAILABILITY_ERROR).should('be.visible');
465-
cy.contains(GPU_BLACKWELL_NO_AVAILABILITY_ERROR).should('be.visible');
466460

467461
cy.findByRole('table', {
468462
name: 'List of Linode Plans',

packages/manager/src/features/components/PlansPanel/PlanInformation.test.tsx

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ import { Notice } from '@linode/ui';
22
import { screen } from '@testing-library/react';
33
import React from 'react';
44

5+
import { planSelectionTypeFactory } from 'src/factories';
56
import { renderWithTheme } from 'src/utilities/testHelpers';
67

78
import {
9+
blackwellLimitedAvailabilityBannerTestId,
810
limitedAvailabilityBannerTestId,
911
PlanInformation,
1012
} from './PlanInformation';
1113

1214
import type { PlanInformationProps } from './PlanInformation';
15+
import type { PlanSelectionType } from './types';
1316

1417
const mockProps: PlanInformationProps = {
1518
flow: 'linode',
@@ -76,4 +79,82 @@ describe('PlanInformation', () => {
7679
expect(infoNotice).toBeInTheDocument();
7780
expect(warningNotice).toBeInTheDocument();
7881
});
82+
83+
it('should inform the user about Blackwell plans having limited availability when appropriate', () => {
84+
const mockPlan = planSelectionTypeFactory.build({
85+
class: 'gpu',
86+
id: 'g3-gpu-rtxpro6000-blackwell-1',
87+
planBelongsToDisabledClass: false,
88+
planHasLimitedAvailability: true,
89+
planIsDisabled512Gb: false,
90+
planIsSmallerThanUsage: false,
91+
planIsTooSmall: false,
92+
});
93+
renderWithTheme(
94+
<PlanInformation
95+
{...mockProps}
96+
hasMajorityOfPlansDisabled={true}
97+
isSelectedRegionEligibleForPlan={true}
98+
plans={[mockPlan as PlanSelectionType]}
99+
planType="gpu"
100+
/>
101+
);
102+
103+
const blackwellLimitedAvailabilityBanner = screen.getByTestId(
104+
blackwellLimitedAvailabilityBannerTestId
105+
);
106+
expect(blackwellLimitedAvailabilityBanner).toBeInTheDocument();
107+
});
108+
109+
it('does not inform the user about Blackwell plans having limited availability when user does not have access to blackwell plans', () => {
110+
const mockPlan = planSelectionTypeFactory.build({
111+
class: 'gpu',
112+
id: 'g3-gpu-rtx4000',
113+
planBelongsToDisabledClass: false,
114+
planHasLimitedAvailability: true,
115+
planIsDisabled512Gb: false,
116+
planIsSmallerThanUsage: false,
117+
planIsTooSmall: false,
118+
});
119+
renderWithTheme(
120+
<PlanInformation
121+
{...mockProps}
122+
hasMajorityOfPlansDisabled={true}
123+
isSelectedRegionEligibleForPlan={true}
124+
plans={[mockPlan as PlanSelectionType]}
125+
planType="gpu"
126+
/>
127+
);
128+
129+
const blackwellLimitedAvailabilityBanner = screen.queryByTestId(
130+
blackwellLimitedAvailabilityBannerTestId
131+
);
132+
expect(blackwellLimitedAvailabilityBanner).not.toBeInTheDocument();
133+
});
134+
135+
it('does not inform the user about Blackwell plans having limited availability when user has access to blackwell plans and are available', () => {
136+
const mockPlan = planSelectionTypeFactory.build({
137+
class: 'gpu',
138+
id: 'g3-gpu-rtxpro6000-blackwell-1',
139+
planBelongsToDisabledClass: false,
140+
planHasLimitedAvailability: false,
141+
planIsDisabled512Gb: false,
142+
planIsSmallerThanUsage: false,
143+
planIsTooSmall: false,
144+
});
145+
renderWithTheme(
146+
<PlanInformation
147+
{...mockProps}
148+
hasMajorityOfPlansDisabled={true}
149+
isSelectedRegionEligibleForPlan={true}
150+
plans={[mockPlan as PlanSelectionType]}
151+
planType="gpu"
152+
/>
153+
);
154+
155+
const blackwellLimitedAvailabilityBanner = screen.queryByTestId(
156+
blackwellLimitedAvailabilityBannerTestId
157+
);
158+
expect(blackwellLimitedAvailabilityBanner).not.toBeInTheDocument();
159+
});
79160
});

packages/manager/src/features/components/PlansPanel/PlanInformation.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,22 @@ export const PlanInformation = (props: PlanInformationProps) => {
6969
const showGPUEgressBanner = Boolean(useFlags().gpuv2?.egressBanner);
7070
const showTransferBanner = Boolean(useFlags().gpuv2?.transferBanner);
7171

72-
const showBlackwellLimitedAvailabilityBanner =
72+
const blackwellGpuPlans =
7373
hasSelectedRegion &&
74+
planType === 'gpu' &&
7475
plans?.length &&
7576
filterPlansByGpuType(
7677
plans as PlanWithAvailability[],
7778
PLAN_FILTER_GPU_RTX_PRO_6000
78-
).every((plan) => getIsPlanDisabled(plan));
79+
);
80+
81+
const showBlackwellLimitedAvailabilityBanner = Boolean(
82+
blackwellGpuPlans &&
83+
blackwellGpuPlans?.length &&
84+
blackwellGpuPlans.every((plan: PlanWithAvailability) =>
85+
getIsPlanDisabled(plan)
86+
)
87+
);
7988

8089
const showLimitedAvailabilityBanner =
8190
hasSelectedRegion &&
@@ -124,7 +133,11 @@ export const PlanInformation = (props: PlanInformationProps) => {
124133
regionsData={regionsData || []}
125134
/>
126135
{showBlackwellLimitedAvailabilityBanner && (
127-
<Notice spacingBottom={8} variant="info">
136+
<Notice
137+
dataTestId={blackwellLimitedAvailabilityBannerTestId}
138+
spacingBottom={8}
139+
variant="info"
140+
>
128141
<Typography
129142
fontSize="1rem"
130143
sx={(theme) => ({ font: theme.font.bold })}
@@ -199,6 +212,8 @@ export const PlanInformation = (props: PlanInformationProps) => {
199212
};
200213

201214
export const limitedAvailabilityBannerTestId = 'limited-availability-banner';
215+
export const blackwellLimitedAvailabilityBannerTestId =
216+
'blackwell-limited-availability-banner';
202217

203218
interface ClassDescriptionCopyProps extends ExtendedPlanType {
204219
/**

0 commit comments

Comments
 (0)