Skip to content
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

fix: [M3-8196] - Fix Linode Edit Config warning message when initially selecting a VPC as the primary interface #11424

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

coliu-akamai
Copy link
Contributor

@coliu-akamai coliu-akamai commented Dec 16, 2024

Description 📝

  • Fixes error messaging when initially selecting a VPC as the primary interface (for eth0)

Changes 🔄

  • Change initial primaryInterfaceIndex to 0 (matches autocomplete's previous initial value)

Target release date 🗓️

next release - 1/14?

Preview 📷

Before After
image image

How to test 🧪

With a Linode not assigned to a VPC,

Reproduction steps

  • Go to linode's configurations and edit existing config
  • set eth0 to VPC and notice how warning message doesn't make sense

Verification steps

Author Checklists

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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@coliu-akamai coliu-akamai self-assigned this Dec 16, 2024
@coliu-akamai coliu-akamai added Bug Fixes for regressions or bugs VPC Relating to VPC project labels Dec 16, 2024
Copy link
Contributor Author

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

I'm not too familiar with configs, but could someone explain why if a config only has a public internet primary interface, configs.interface = [], but if a config has public internet and VPC interfaces, then configs.interfaces contains an interface with purpose = public?

image

vs

image

@@ -1004,7 +1004,7 @@ export const LinodeConfigDialog = (props: Props) => {
disabled={isReadOnly}
label="Primary Interface (Default Route)"
options={getPrimaryInterfaceOptions(values.interfaces)}
value={primaryInterfaceOptions[primaryInterfaceIndex ?? 0]}
Copy link
Contributor Author

@coliu-akamai coliu-akamai Dec 16, 2024

Choose a reason for hiding this comment

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

Users would see eth0 initially selected as the primary interface and be confused why the warning notice for 'selecting VPC as the primary interface' displays when they set eth0 to VPC. However, for the Edit Config flow, the notice was displayed bc primaryInterfaceIndex starts out as undefined, and stays undefined if there is no existing primary interface (lines 505-511).

(alternatively, could instead have an else case for lines 505-511 inside that useEffect --

if (indexOfExistingPrimaryInterface !== -1) {
  setPrimaryInterfaceIndex(indexOfExistingPrimaryInterface);
} else {
  setPrimaryInterfaceIndex(0);
}

@coliu-akamai coliu-akamai marked this pull request as ready for review December 16, 2024 20:17
@coliu-akamai coliu-akamai requested a review from a team as a code owner December 16, 2024 20:17
@coliu-akamai coliu-akamai requested review from bnussman-akamai and abailly-akamai and removed request for a team December 16, 2024 20:17
@bnussman-akamai
Copy link
Member

@coliu-akamai I don't know if this is 100% correct but I think configs with an empty interfaces array just implies that a default public eth0 interface will be used by the Linode

@coliu-akamai coliu-akamai changed the title fix: [M3-8196] - Fix VPC Config error messaging when initially selecting VPC interface fix: [M3-8196] - Fix Linode Edit Config warning message when initially selecting a VPC as the primary interface Dec 16, 2024
@coliu-akamai coliu-akamai added the Add'tl Approval Needed Waiting on another approval! label Dec 16, 2024
Copy link

Coverage Report:
Base Coverage: 86.98%
Current Coverage: 86.98%

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 466 passing tests on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing466 Passing2 Skipped102m 27s

@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Dec 17, 2024
@coliu-akamai coliu-akamai merged commit d99b334 into linode:develop Dec 17, 2024
23 checks passed
@coliu-akamai coliu-akamai deleted the m3-8196 branch December 17, 2024 14:50
Copy link

cypress bot commented Dec 17, 2024

Cloud Manager E2E    Run #6979

Run Properties:  status check failed Failed #6979  •  git commit d99b334d20: fix: [M3-8196] - Fix Linode Edit Config warning message when initially selecting...
Project Cloud Manager E2E
Branch Review develop
Run status status check failed Failed #6979
Run duration 29m 53s
Commit git commit d99b334d20: fix: [M3-8196] - Fix Linode Edit Config warning message when initially selecting...
Committer Connie Liu
View all properties for this run ↗︎

Test results
Tests that failed  Failures 2
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 464
View all changes introduced in this branch ↗︎

Tests for review

Failed  rebuild-linode.spec.ts • 1 failed test

View Output Video

Test Artifacts
rebuild linode > rebuilds a linode from Account StackScript Screenshots Video
Failed  linode-config.spec.ts • 1 failed test

View Output Video

Test Artifacts
Linode Config management > End-to-End > Clones a config Screenshots Video
Flakiness  linodes/search-linodes.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Search Linodes > create a linode and make sure it shows up in the table and is searchable in main search tool Screenshots Video
Flakiness  vpc/vpc-linodes-update.spec.ts • 1 flaky test

View Output Video

Test Artifacts
VPC assign/unassign flows > can unassign Linode(s) from a VPC Screenshots Video

dmcintyr-akamai pushed a commit to dmcintyr-akamai/manager that referenced this pull request Jan 9, 2025
…y selecting a VPC as the primary interface (linode#11424)

* set initial primaryInterfaceIndex to 0

* extra space oops

* some type cleanup

* Added changeset: Linode Edit Config warning  message when initially selecting a VPC as the primary interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Bug Fixes for regressions or bugs VPC Relating to VPC project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants