Skip to content

Commit a02c07b

Browse files
Merge pull request #11288 from linode/staging
Release v1.132.1 - staging → master
2 parents 6b4b139 + cf10a8d commit a02c07b

File tree

8 files changed

+56
-10
lines changed

8 files changed

+56
-10
lines changed

packages/manager/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [2024-11-19] - v1.132.1
8+
9+
10+
### Fixed:
11+
12+
- Disable shared CPU whenever APL is enabled ([#11284](https://github.com/linode/manager/pull/11284))
13+
714
## [2024-11-12] - v1.132.0
815

916

packages/manager/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "linode-manager",
33
"author": "Linode",
44
"description": "The Linode Manager website",
5-
"version": "1.132.0",
5+
"version": "1.132.1",
66
"private": true,
77
"type": "module",
88
"bugs": {

packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlansPanel.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export const KubernetesPlansPanel = (props: Props) => {
6969
Boolean(flags.soldOutChips) && selectedRegionId !== undefined
7070
);
7171

72+
const isPlanDisabledByAPL = (plan: 'shared' | LinodeTypeClass) =>
73+
plan === 'shared' && Boolean(isAPLEnabled);
74+
7275
const _types = types.filter(
7376
(type) =>
7477
!type.id.includes('dedicated-edge') && !type.id.includes('nanode-edge')
@@ -105,10 +108,14 @@ export const KubernetesPlansPanel = (props: Props) => {
105108
)}
106109
hasMajorityOfPlansDisabled={hasMajorityOfPlansDisabled}
107110
hasSelectedRegion={hasSelectedRegion}
111+
isAPLEnabled={isAPLEnabled}
108112
planType={plan}
109113
regionsData={regionsData}
110114
/>
111115
<KubernetesPlanContainer
116+
wholePanelIsDisabled={
117+
isPlanPanelDisabled(plan) || isPlanDisabledByAPL(plan)
118+
}
112119
allDisabledPlans={allDisabledPlans}
113120
getTypeCount={getTypeCount}
114121
hasMajorityOfPlansDisabled={hasMajorityOfPlansDisabled}
@@ -118,7 +125,6 @@ export const KubernetesPlansPanel = (props: Props) => {
118125
selectedId={selectedId}
119126
selectedRegionId={selectedRegionId}
120127
updatePlanCount={updatePlanCount}
121-
wholePanelIsDisabled={isPlanPanelDisabled(plan)}
122128
/>
123129
</>
124130
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import * as React from 'react';
2+
3+
import { Notice } from 'src/components/Notice/Notice';
4+
5+
import { APL_NOTICE_COPY } from './constants';
6+
7+
interface Props {
8+
dataTestId?: string;
9+
}
10+
11+
export const APLNotice = (props: Props) => {
12+
const { dataTestId } = props;
13+
14+
return (
15+
<Notice dataTestId={dataTestId} variant="error">
16+
{APL_NOTICE_COPY}
17+
</Notice>
18+
);
19+
};

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { PlanInformationProps } from './PlanInformation';
1313
const mockProps: PlanInformationProps = {
1414
hasMajorityOfPlansDisabled: false,
1515
hasSelectedRegion: true,
16+
isAPLEnabled: true,
1617
isSelectedRegionEligibleForPlan: false,
1718
planType: 'standard',
1819
};
@@ -28,6 +29,12 @@ describe('PlanInformation', () => {
2829
expect(element).toBeInTheDocument();
2930
});
3031

32+
it('should render APLNotice when planType is "shared" and APL is enabled', () => {
33+
renderWithTheme(<PlanInformation {...mockProps} planType="shared" />);
34+
const element = screen.getByTestId('apl-notice');
35+
expect(element).toBeInTheDocument();
36+
});
37+
3138
it('should render MetalNotice when planType is "metal"', () => {
3239
renderWithTheme(<PlanInformation {...mockProps} planType="metal" />);
3340
const element = screen.getByTestId('metal-notice');

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Typography } from 'src/components/Typography';
66
import { StyledNoticeTypography } from 'src/features/components/PlansPanel/PlansAvailabilityNotice.styles';
77
import { useFlags } from 'src/hooks/useFlags';
88

9+
import { APLNotice } from './APLNotice';
910
import {
1011
DEDICATED_COMPUTE_INSTANCES_LINK,
1112
GPU_COMPUTE_INSTANCES_LINK,
@@ -21,13 +22,17 @@ import type { Region } from '@linode/api-v4';
2122
import type { LinodeTypeClass } from '@linode/api-v4/lib/linodes';
2223
import type { Theme } from '@mui/material/styles';
2324

24-
export interface PlanInformationProps {
25+
interface ExtendedPlanType {
26+
planType: 'shared' | LinodeTypeClass;
27+
}
28+
29+
export interface PlanInformationProps extends ExtendedPlanType {
2530
disabledClasses?: LinodeTypeClass[];
2631
hasMajorityOfPlansDisabled: boolean;
2732
hasSelectedRegion: boolean;
2833
hideLimitedAvailabilityBanner?: boolean;
34+
isAPLEnabled?: boolean;
2935
isSelectedRegionEligibleForPlan: boolean;
30-
planType: LinodeTypeClass;
3136
regionsData?: Region[];
3237
}
3338

@@ -37,6 +42,7 @@ export const PlanInformation = (props: PlanInformationProps) => {
3742
hasMajorityOfPlansDisabled,
3843
hasSelectedRegion,
3944
hideLimitedAvailabilityBanner,
45+
isAPLEnabled,
4046
isSelectedRegionEligibleForPlan,
4147
planType,
4248
regionsData,
@@ -100,6 +106,9 @@ export const PlanInformation = (props: PlanInformationProps) => {
100106
hasDisabledClass={getDisabledClass('metal')}
101107
/>
102108
) : null}
109+
{planType === 'shared' && isAPLEnabled ? (
110+
<APLNotice dataTestId="apl-notice" />
111+
) : null}
103112
{planType === 'premium' ? (
104113
<PlansAvailabilityNotice
105114
hasSelectedRegion={hasSelectedRegion}
@@ -134,11 +143,7 @@ export const PlanInformation = (props: PlanInformationProps) => {
134143

135144
export const limitedAvailabilityBannerTestId = 'limited-availability-banner';
136145

137-
interface ClassDescriptionCopyProps {
138-
planType: 'shared' | LinodeTypeClass;
139-
}
140-
141-
export const ClassDescriptionCopy = (props: ClassDescriptionCopyProps) => {
146+
export const ClassDescriptionCopy = (props: ExtendedPlanType) => {
142147
const { planType } = props;
143148
let planTypeLabel: null | string;
144149
let docLink: null | string;

packages/manager/src/features/components/PlansPanel/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export const PLAN_IS_CURRENTLY_UNAVAILABLE_COPY =
1010
'This plan is currently unavailable.';
1111
export const PLAN_IS_TOO_SMALL_FOR_APL_COPY =
1212
'This plan is too small for Application Platform for LKE.';
13+
export const APL_NOTICE_COPY =
14+
'Shared CPU instances are currently not available for Application Platform for LKE';
1315

1416
export const LIMITED_AVAILABILITY_LINK =
1517
'https://www.linode.com/global-infrastructure/availability/';

packages/manager/src/features/components/PlansPanel/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export const extractPlansInformation = ({
302302
)
303303
);
304304
const planIsTooSmallForAPL =
305-
isAPLEnabled && Boolean(plan.memory < 8000 || plan.vcpus < 4);
305+
isAPLEnabled && Boolean(plan.memory < 16000 || plan.vcpus < 4);
306306

307307
return {
308308
...plan,

0 commit comments

Comments
 (0)