Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Default selection of network interface type to linode interface in Linode create flow ([#13221](https://github.com/linode/manager/pull/13221))
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// Confirm that mocked Firewall is shown in the Autocomplete, and then select it.
cy.findByLabelText('Firewall').should('be.visible');
cy.get('[data-qa-autocomplete="Firewall"]').within(() => {
Expand Down Expand Up @@ -491,9 +494,6 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Confirm that mocked Firewall is shown in the Autocomplete, and then select it.
cy.findByLabelText('Public Interface Firewall').should('be.visible');
cy.get('[data-qa-autocomplete="Public Interface Firewall"]').within(() => {
Expand Down Expand Up @@ -566,6 +566,9 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

cy.findByText('Create Firewall').should('be.visible').click();

ui.drawer
Expand Down Expand Up @@ -661,9 +664,6 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

cy.findByText('Create Firewall').should('be.visible').click();

ui.drawer
Expand Down Expand Up @@ -766,6 +766,9 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// Creating the linode without a firewall should display a warning.
ui.button
.findByTitle('Create Linode')
Expand Down Expand Up @@ -869,9 +872,6 @@ describe('Create Linode with Firewall (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Creating the linode without a firewall should display a warning.
ui.button
.findByTitle('Create Linode')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ describe('Create Linode with VLANs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// select existing VLAN.
linodeCreatePage.selectInterface('vlan');
// Confirm that mocked VLAN is shown in the Autocomplete, and then select it.
Expand Down Expand Up @@ -400,9 +403,6 @@ describe('Create Linode with VLANs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Select VLAN card
linodeCreatePage.selectInterface('vlan');

Expand Down Expand Up @@ -485,6 +485,9 @@ describe('Create Linode with VLANs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// Select VLAN card
linodeCreatePage.selectInterface('vlan');

Expand Down Expand Up @@ -567,9 +570,6 @@ describe('Create Linode with VLANs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Select VLAN card
linodeCreatePage.selectInterface('vlan');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ describe('Create Linode with VPCs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// Select VPC
linodeCreatePage.selectInterface('vpc');

Expand Down Expand Up @@ -612,9 +615,6 @@ describe('Create Linode with VPCs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Select VPC option
linodeCreatePage.selectInterface('vpc');

Expand Down Expand Up @@ -750,6 +750,9 @@ describe('Create Linode with VPCs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to legacy Config Interfaces
linodeCreatePage.selectLegacyConfigInterfacesType();

// Select VPC card
linodeCreatePage.selectInterface('vpc');

Expand Down Expand Up @@ -933,9 +936,6 @@ describe('Create Linode with VPCs (Linode Interfaces)', () => {
// Confirm the Linode Interfaces section is shown.
assertNewLinodeInterfacesIsAvailable();

// Switch to Linode Interfaces
linodeCreatePage.selectLinodeInterfacesType();

// Select VPC card
linodeCreatePage.selectInterface('vpc');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const InterfaceGeneration = () => {
aria-labelledby="interface-generation"
onChange={field.onChange}
sx={{ my: '0px !important' }}
value={field.value ?? 'legacy_config'}
value={field.value ?? 'linode'}
>
<FormControlLabel
control={<Radio />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,6 @@ describe('getIsValidLinodeLabelCharacter', () => {
});

describe('getDefaultInterfaceGenerationFromAccountSetting', () => {
it('returns "legacy_config" for "legacy_config_default_but_linode_allowed"', () => {
expect(
getDefaultInterfaceGenerationFromAccountSetting(
'legacy_config_default_but_linode_allowed'
)
).toBe('legacy_config');
});

it('returns "legacy_config" for "legacy_config_only"', () => {
expect(
getDefaultInterfaceGenerationFromAccountSetting('legacy_config_only')
Expand All @@ -454,6 +446,14 @@ describe('getDefaultInterfaceGenerationFromAccountSetting', () => {
);
});

it('returns "linode" for "legacy_config_default_but_linode_allowed"', () => {
expect(
getDefaultInterfaceGenerationFromAccountSetting(
'legacy_config_default_but_linode_allowed'
)
).toBe('linode');
});

it('returns "linode" for "linode_default_but_legacy_config_allowed"', () => {
expect(
getDefaultInterfaceGenerationFromAccountSetting(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,13 @@ export const getDefaultInterfaceGenerationFromAccountSetting = (
): InterfaceGenerationType | undefined => {
if (
accountSetting === 'linode_only' ||
accountSetting === 'linode_default_but_legacy_config_allowed'
accountSetting === 'linode_default_but_legacy_config_allowed' ||
accountSetting === 'legacy_config_default_but_linode_allowed'
Copy link
Contributor

@coliu-akamai coliu-akamai Jan 2, 2026

Choose a reason for hiding this comment

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

would it make more sense to instead remove legacy_config_default_but_linode_allowed as an option in the Account Settings page?

reading through the aha, I also like Daniel's suggestion for a single setting. Although I understand legacy_config_default_but_linode_allowed is more for the API and doesn't have to correspond to CM's preselected default value, I feel like the current mismatch could lead to confusion + we'd have to be careful in our explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently we don't have requirement to remove legacy_config_default_but_linode_allowed option from account settings page and hence we will continue to have all the options as we had earlier. So removal of legacy_config_default_but_linode_allowed from this logic will be error prone. cc: @dabaka

Copy link

Choose a reason for hiding this comment

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

Hi @coliu-akamai we don't have expectation that the account setting will have a bearing on the Linode Create option.

We had the idea to add some 'this is most relevant for the API' text, but not sure if that is weird in general or weird to have in the UI.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, thanks @grevanak-akamai and @dabaka!

) {
// Default selection is to the Linode interface to encourage new customer accounts to adopt it safely when using Cloud Manager.
return 'linode';
}
if (
accountSetting === 'legacy_config_only' ||
accountSetting === 'legacy_config_default_but_linode_allowed'
) {
if (accountSetting === 'legacy_config_only') {
return 'legacy_config';
}
return undefined;
Expand Down