Skip to content

Conversation

@jaalah-akamai
Copy link
Contributor

@jaalah-akamai jaalah-akamai commented Nov 5, 2025

Description

Fixes incorrect maintenance time display in the Upcoming maintenance table. The code was incorrectly adding notification_period_sec to the when field to derive the start time. The when and start_time fields are equivalent timestamps representing when maintenance occurs, so when should be used directly.

Also improves time display accuracy by rounding up hours when minutes >= 30 (e.g., "1 day 3 hours 49 minutes" displays as "in 1 day 4 hours" instead of "in 1 day 3 hours").

Changes

  • Use when directly as the start time instead of adding notification_period_sec
  • Remove policies parameter dependency from deriveMaintenanceStartISO and getUpcomingRelativeLabel
  • Remove policies query from MaintenanceTableRow component
  • Round up hours when minutes >= 30 for better accuracy in day+hour displays
  • Update comments to clarify that when and start_time are equivalent timestamps
  • Ensure consistent UTC-based time calculations

Scope

Upon production release, changes in this PR will be visible to:

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

Target release date

TBD

Preview

Before After
Shows incorrect time, is was adding notification_period_sec when the field already accounts for this Screenshot 2025-11-10 at 11 54 50 AM Shows correct time based on when timestamp Screenshot 2025-11-10 at 12 01 08 PM

How to test

Prerequisites

  • Access to an account with scheduled maintenance events
    • Use Use your devcloud cx account
  • Maintenance events with when timestamps and start_time: null

Reproduction steps

  1. Navigate to Account → Maintenance → Upcoming tab
  2. Observe the "When" column showing relative time until maintenance
  3. Compare this branch vs devcloud

Verification steps

  • Verify the relative time matches the when timestamp (not when + notification_period_sec)
  • Verify times display correctly for events with start_time: null
  • Verify times display correctly for events with start_time populated
  • Verify rounding works correctly (e.g., "1 day 3 hours 49 minutes" shows as "in 1 day 4 hours")
  • Verify no flash/loading state issues when the table first renders

@jaalah-akamai jaalah-akamai changed the base branch from develop to staging November 5, 2025 15:42
@jaalah-akamai jaalah-akamai self-assigned this Nov 10, 2025
@jaalah-akamai jaalah-akamai marked this pull request as ready for review November 10, 2025 17:23
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner November 10, 2025 17:23
@jaalah-akamai
Copy link
Contributor Author

Checking with team as to if we need to hotfix this to staging or have it go out in next release via develop branch.

@jaalah-akamai jaalah-akamai changed the base branch from staging to develop November 12, 2025 14:31
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 5 failing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
5 Failing848 Passing11 Skipped60m 9s

Details

Failing Tests
SpecTest
create-stackscripts.spec.tsCloud Manager Cypress Tests→Create stackscripts » creates a StackScript and deploys a Linode with it
resize-linode.spec.tsCloud Manager Cypress Tests→resize linode » resizes a linode by decreasing size
update-stackscripts.spec.tsCloud Manager Cypress Tests→Update stackscripts » updates a StackScript
linode-storage.spec.tsCloud Manager Cypress Tests→linode storage tab » resize disk
switch-linode-state.spec.tsCloud Manager Cypress Tests→switch linode state » powers off a linode from details page

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/stackscripts/create-stackscripts.spec.ts,cypress/e2e/core/linodes/resize-linode.spec.ts,cypress/e2e/core/stackscripts/update-stackscripts.spec.ts,cypress/e2e/core/linodes/linode-storage.spec.ts,cypress/e2e/core/linodes/switch-linode-state.spec.ts"

@jaalah-akamai jaalah-akamai added Ready for Review For Next Release Apply this label if the PR needs to be in the next release. labels Nov 13, 2025
@jaalah-akamai jaalah-akamai requested a review from a team November 14, 2025 14:46
@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Nov 17, 2025
@jaalah-akamai jaalah-akamai merged commit 6b0b083 into linode:develop Nov 24, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Next Release Apply this label if the PR needs to be in the next release. Host & VM Maintenance Ready for Review

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

5 participants