Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.

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


## [2025-10-22] - v1.153.1

### Fixed:

- VPC IP range errors not being surfaced on the Linode Create page ([#13004](https://github.com/linode/manager/pull/13004))
- Unexpected VPC IPv4 auto-assign checkbox behavior on the Linode Create page ([#13004](https://github.com/linode/manager/pull/13004))
- VPC Dual Stack error on the Linode Create page ([#13004](https://github.com/linode/manager/pull/13004))

## [2025-10-21] - v1.153.0


Expand Down
2 changes: 1 addition & 1 deletion packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "linode-manager",
"author": "Linode",
"description": "The Linode Manager website",
"version": "1.153.0",
"version": "1.153.1",
"private": true,
"type": "module",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export const VPC = ({ index }: Props) => {
// Otherwise, just clear the selected subnet
resetField(`linodeInterfaces.${index}.vpc.subnet_id`);
}

// Clear any previously selected dual-stack values if the current vpc is not dual-stack
if (isDualStackEnabled && !vpc?.ipv6) {
resetField(`linodeInterfaces.${index}.vpc.ipv6`);
}
}}
options={vpcs ?? []}
placeholder="None"
Expand Down Expand Up @@ -145,6 +150,7 @@ export const VPC = ({ index }: Props) => {
name={`linodeInterfaces.${index}.vpc.ipv4.addresses.0.address`}
render={({ field, fieldState }) => (
<VPCIPv4Address
autoAssignValue="auto"
disabled={!regionSupportsVPCs}
errorMessage={
fieldState.error?.message ??
Expand Down
14 changes: 10 additions & 4 deletions packages/manager/src/features/Linodes/LinodeCreate/VPC/VPC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ export const VPC = () => {
setValue('interfaces.0.subnet_id', null);
}

// Clear any previously selected dual-stack values if the current vpc is not dual-stack
if (isDualStackEnabled && !vpc?.ipv6) {
setValue(`interfaces.0.ipv6`, undefined);
}

// Capture analytics
if (!vpc?.id) {
sendLinodeCreateFormInputEvent({
Expand Down Expand Up @@ -232,6 +237,7 @@ export const VPC = () => {
name="interfaces.0.ipv4.vpc"
render={({ field, fieldState }) => (
<VPCIPv4Address
autoAssignValue={null}
errorMessage={fieldState.error?.message}
fieldValue={field.value}
onChange={field.onChange}
Expand Down Expand Up @@ -292,11 +298,11 @@ export const VPC = () => {
sx={(theme) => ({ marginTop: theme.spacingFunction(16) })}
/>
</Box>
{formState.errors.interfaces?.[1] &&
formState.errors.interfaces[1] &&
'ip_ranges' in formState.errors.interfaces[1] && (
{formState.errors.interfaces?.[0] &&
formState.errors.interfaces[0] &&
'ip_ranges' in formState.errors.interfaces[0] && (
<Notice
text={formState.errors.interfaces[1].ip_ranges?.message}
text={formState.errors.interfaces[0].ip_ranges?.message}
variant="error"
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const AddVPCIPv4Address = (props: Props) => {
name={`vpc.ipv4.addresses.${index}.address`}
render={({ field, fieldState }) => (
<VPCIPv4Address
autoAssignValue="auto"
errorMessage={fieldState.error?.message}
fieldValue={field.value}
onChange={field.onChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const EditVPCIPv4Address = (props: Props) => {
name={`vpc.ipv4.addresses.${index}.address`}
render={({ field, fieldState }) => (
<VPCIPv4Address
autoAssignValue="auto"
errorMessage={fieldState.error?.message}
fieldValue={field.value}
ipv4Address={linodeInterface.vpc?.ipv4?.addresses[index].address}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,51 @@
} from 'src/features/VPCs/constants';

interface Props {
/**
* Linode Interfaces use "auto" to auto-assign IP addresses
* Legacy Config Interfaces use `null` to auto-assign IP addresses
*/
autoAssignValue: 'auto' | null;
disabled?: boolean;
errorMessage?: string;
fieldValue?: null | string;
ipv4Address?: string;
onBlur?: () => void;
onChange: (ipv4Address: string) => void;
onChange: (ipv4Address: null | string) => void;
}

export const VPCIPv4Address = (props: Props) => {
const { errorMessage, fieldValue, onBlur, disabled, onChange, ipv4Address } =
props;
const {
errorMessage,
fieldValue,
onBlur,
disabled,
onChange,
ipv4Address,
autoAssignValue,
} = props;

// Auto-assign should be checked if any of the following are true
// - field value matches the identifier
// - field value is undefined (because the API's default behavior is to auto-assign)
const shouldAutoAssign = fieldValue === autoAssignValue || fieldValue === undefined;

Check warning on line 43 in packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeInterfaces/VPCIPv4Address.tsx

View workflow job for this annotation

GitHub Actions / eslint

[eslint] packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeInterfaces/VPCIPv4Address.tsx#L43 <prettier/prettier>(https://github.com/prettier/eslint-plugin-prettier#options)

Insert `⏎···`
Raw output
{"ruleId":"prettier/prettier","severity":1,"message":"Insert `⏎···`","line":43,"column":27,"nodeType":null,"messageId":"insert","endLine":43,"endColumn":27,"fix":{"range":[1018,1018],"text":"\n   "}}

return (
<Stack rowGap={1}>
<Stack direction="row">
<FormControlLabel
checked={['auto', null, undefined].includes(fieldValue)}
checked={shouldAutoAssign}
control={<Checkbox />}
disabled={disabled}
label="Auto-assign VPC IPv4"
onChange={(e, checked) =>
onChange(checked ? 'auto' : (ipv4Address ?? ''))
onChange(checked ? autoAssignValue : (ipv4Address ?? ''))
}
sx={{ pl: 0.4, mr: 0 }}
/>
<TooltipIcon status="info" text={VPC_AUTO_ASSIGN_IPV4_TOOLTIP} />
</Stack>
{fieldValue !== 'auto' && (
{!shouldAutoAssign && (
<TextField
containerProps={{ sx: { mb: 1.5, mt: 1 } }}
errorText={errorMessage}
Expand Down
Loading