Skip to content

ESD-1640: Read VXC shutdown status from the Shutdown field#525

Open
Phil-Browne wants to merge 4 commits into
mainfrom
worktree-esd-1640-vxc-shutdown-status-field
Open

ESD-1640: Read VXC shutdown status from the Shutdown field#525
Phil-Browne wants to merge 4 commits into
mainfrom
worktree-esd-1640-vxc-shutdown-status-field

Conversation

@Phil-Browne

Copy link
Copy Markdown
Contributor

The VXC interactive update prompt showed the current shutdown status from AdminLocked instead of Shutdown. Those are separate fields on the SDK VXC type, so a VXC that was shut down but not admin-locked displayed as enabled, which could lead someone to toggle shutdown the wrong way.

  • Read vxc.Shutdown instead of vxc.AdminLocked for the displayed shutdown status
  • Added a test covering the shutdown-but-not-locked case and the inverse

The write path already used req.Shutdown correctly, so this is a display-only fix.

The interactive update prompt showed the current shutdown status from
AdminLocked instead of Shutdown, so a VXC that was shut down but not
admin-locked displayed as enabled.
Copilot AI review requested due to automatic review settings July 10, 2026 16:18
@Phil-Browne Phil-Browne requested review from a team and penzeliz-megaport as code owners July 10, 2026 16:18
@Phil-Browne Phil-Browne requested a review from ianb-mp July 10, 2026 16:18
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.30%. Comparing base (dee5b8d) to head (930fe60).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
+ Coverage   79.29%   79.30%   +0.01%     
==========================================
  Files         193      193              
  Lines       18683    18683              
==========================================
+ Hits        14814    14816       +2     
+ Misses       2820     2819       -1     
+ Partials     1049     1048       -1     
Files with missing lines Coverage Δ
internal/commands/vxc/vxc_prompts.go 35.94% <100.00%> (+0.65%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the VXC interactive update prompt to display shutdown status based on the SDK’s Shutdown field (instead of the unrelated AdminLocked field), preventing users from being misled about whether a VXC is currently shut down.

Changes:

  • Updated the shutdown status display logic in the interactive update prompt to use vxc.Shutdown.
  • Added a regression test covering the “shutdown-but-not-locked” case and the inverse (“locked-but-not-shutdown”).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/commands/vxc/vxc_prompts.go Reads shutdown status from vxc.Shutdown when displaying the current shutdown state during interactive updates.
internal/commands/vxc/vxc_prompts_test.go Adds a test ensuring the displayed shutdown status reflects Shutdown rather than AdminLocked.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@penzeliz-megaport penzeliz-megaport left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed for correctness; no findings. LGTM.

…-shutdown-status-field

# Conflicts:
#	internal/commands/vxc/vxc_prompts_test.go
@Phil-Browne

Copy link
Copy Markdown
Contributor Author

Merge conflict resolved in b2824f4

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants