Skip to content

Conversation

@pmakode-akamai
Copy link
Contributor

@pmakode-akamai pmakode-akamai commented Dec 31, 2025

Description 📝

Update the default sort of the plans when "All" is selected so that the plans descend from newest (G8) to oldest (G6)

Changes 🔄

  • Added client-side sorting for generational plans when "All" is selected to show plans from newest (G8) to oldest (G6)
  • Added a small getGenerationRank helper to support the ordering
  • Added unit tests for the helper

Scope 🚢

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

N/A

Preview 📷

Before After
Screenshot 2025-12-31 at 3 22 51 PM Screenshot 2025-12-31 at 2 01 19 PM

How to test 🧪

Verification steps

  • Go to Create Linode -> Select a region -> Verify that the plan ordering works as expected
  • Go to Kubernetes / Create Cluster -> Select a region -> Verify that the plan ordering works as expected
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 tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@pmakode-akamai pmakode-akamai self-assigned this Dec 31, 2025
@pmakode-akamai pmakode-akamai added the GCP Generational Compute Plans label Dec 31, 2025
@pmakode-akamai pmakode-akamai marked this pull request as ready for review December 31, 2025 09:19
@pmakode-akamai pmakode-akamai requested a review from a team as a code owner December 31, 2025 09:19
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 10 failing tests on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
10 Failing860 Passing11 Skipped77m 18s

Details

Failing Tests
SpecTest
one-click-apps.spec.tsCloud Manager Cypress Tests→OneClick Apps (OCA) » Deploys a Linode from a One Click App with user defined fields
timerange-verification.spec.tsCloud Manager Cypress Tests→Integration tests for verifying Cloudpulse custom and preset configurations » should implement and validate custom date/time picker for a specific date and time range
alerts-create.spec.tsCloud Manager Cypress Tests→Create flow when beta alerts enabled by region and feature flag » create flow defaults to legacy alerts
alerts-create.spec.tsCloud Manager Cypress Tests→Create flow when beta alerts enabled by region and feature flag » create flow after switching to beta alerts
alerts-create.spec.tsCloud Manager Cypress Tests→Create flow when beta alerts enabled by region and feature flag » alerts not present for region where alerts disabled
smoke-community-stackscripts.spec.tsCloud Manager Cypress Tests→Community Stackscripts integration tests » deploys a new linode as expected
create-stackscripts.spec.tsCloud Manager Cypress Tests→Create stackscripts » creates a StackScript and deploys a Linode with it
create-stackscripts.spec.tsCloud Manager Cypress Tests→Create stackscripts » creates a StackScript with Any/All target image
create-linode.spec.tsCloud Manager Cypress Tests→Create Linode→End-to-end→By plan type » creates a Dedicated CPU Linode
lke-update.spec.tsCloud Manager Cypress Tests→LKE cluster updates→APL disabled » can add and delete node pools

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/oneClickApps/one-click-apps.spec.ts,cypress/e2e/core/cloudpulse/timerange-verification.spec.ts,cypress/e2e/core/linodes/alerts-create.spec.ts,cypress/e2e/core/stackscripts/smoke-community-stackscripts.spec.ts,cypress/e2e/core/stackscripts/create-stackscripts.spec.ts,cypress/e2e/core/linodes/create-linode.spec.ts,cypress/e2e/core/kubernetes/lke-update.spec.ts"

* Used to sort plans from newest to oldest when the "All" type
* filter is selected (G8 -> G7 -> G6).
*/
export const getGenerationRank = (planId: string): number => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The returned values (3,2,1,0) are hardcoded. If more generations are introduced in future, changes will require code edits. We can use a mapping object for easier extensibility:

const generationMapping: Record<string, number> = {
  'g8-': 3,
  'g7-': 2,
  'g6-': 1,
};
for (const prefix in generationMapping) {
  if (planId.startsWith(prefix)) return generationMapping[prefix];
}
return 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GCP Generational Compute Plans Ready for Review

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

3 participants