Skip to content

Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection#2467

Open
avivtur wants to merge 1 commit into
kubev2v:mainfrom
avivtur:feat/MTV-5506
Open

Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection#2467
avivtur wants to merge 1 commit into
kubev2v:mainfrom
avivtur:feat/MTV-5506

Conversation

@avivtur

@avivtur avivtur commented Jun 11, 2026

Copy link
Copy Markdown
Member

Links

Description

Show the backend's WaitForGuestReboots pipeline step with user-friendly names and warnings so admins know a Windows VM is still rebooting to install drivers after migration.

  • Add a display name map for all pipeline steps (e.g. WaitForGuestReboots → "Post-migration setup", VirtualMachineCreation → "Virtual machine creation")
  • Show a warning alert during the WaitForGuestReboots phase: "Windows VM is installing drivers and configuring network. Multiple reboots are expected."
  • Add "Post-migration setup" as a distinct VM migration status (filterable)
  • Suppress VM navigation links (in the pipeline table and VM row) while the VM is in post-migration setup to prevent premature access

Demo

Screenshot (48)

CC://

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added post-migration setup phase tracking to display VM status during driver installation and configuration.
    • Added warning message for Windows VMs during reboots and driver installation.
    • Enhanced migration progress display with improved step labeling and status clarity.
  • Localization

    • Updated translation strings across English, Spanish, French, Japanese, Korean, and Chinese locales for new post-migration setup labels and messages.

Show the WaitForGuestReboots pipeline step as "Post-migration setup"
with a warning alert, differentiate VM migration status, and suppress
VM navigation links while Windows VMs are still rebooting after
conversion to prevent premature access.

Resolves: MTV-5507
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds post-migration VM setup detection and guest reboot warnings to the Forklift console plugin. New pipeline step tracking utilities identify when VMs enter the "WaitForGuestReboots" phase, status enums support the new PostMigrationSetup state, and the migration progress UI conditionally renders appropriate messages and alerts. Corresponding i18n entries were added across six locales.

Changes

Post-Migration VM Setup with Guest Reboot Warnings

Layer / File(s) Summary
Post-migration detection utilities and status constants
src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/utils.ts, src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/constants.ts, src/utils/constants.ts
New exported constants and helpers: WAIT_FOR_GUEST_REBOOTS_NAME, PIPELINE_STEP_DISPLAY_NAMES, getPipelineStepDisplayName(), and isVmInPostMigrationSetup() detect post-migration setup by checking for the WaitForGuestReboots step in running phase. Updated getVMMigrationStatus() returns PostMigrationSetup status when detected. Added PostMigrationSetup to vmStatuses enum and running to taskStatuses.
Migration progress table post-migration rendering
src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/components/MigrationStatusExpandedPage/components/MigrationProgressTable/MigrationProgressTable.tsx
Component now computes inPostMigrationSetup flag and detects guest reboot pipelines. Pipeline rows use displayName for drawer headers. VM creation row conditionally shows "Created " when in post-migration setup, or the original button/link when not. Inline warning Alert renders when guest reboots are running, warning users not to access the VM.
VM name field conditional linking
src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/fields.tsx
The Name field now imports isVmInPostMigrationSetup and renders as plain text when post-migration setup is active, or as a linked cell only when VM creation is completed and not in post-migration phase.
Internationalization updates
locales/en/plugin__forklift-console-plugin.json, locales/es/plugin__forklift-console-plugin.json, locales/fr/plugin__forklift-console-plugin.json, locales/ja/plugin__forklift-console-plugin.json, locales/ko/plugin__forklift-console-plugin.json, locales/zh/plugin__forklift-console-plugin.json
Added translation keys across all locales for: Created {{vmName}}, disk-related labels (Disk allocation, Do not access this VM), Image conversion, Initialize, post-migration setup labels (Post-migration setup, PostMigrationSetup, Preflight inspection), Snapshot consolidation, Virtual machine creation, and a Windows-specific status message about driver installation and network configuration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • jschuler
  • pcbailey

Poem

🐰 Migrations now rest with a gentle reboot,
Guest OSes settle, with network in suit,
No touching, no rushing—let reboots complete,
Post-setup alerts make the workflow so neat,
In six tongues we whisper, the migrations dance sweet! 🎪

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection' is specific and clearly summarizes the main changes: adding post-migration setup display and VM access protection during reboots.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description includes required sections: links to Jira tickets, clear description of changes, and a demo screenshot showing the UI behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.45%. Comparing base (13484d0) to head (3d91639).
⚠️ Report is 1112 commits behind head on main.

Files with missing lines Patch % Lines
.../MigrationProgressTable/MigrationProgressTable.tsx 0.00% 14 Missing ⚠️
...s/MigrationStatusVirtualMachineList/utils/utils.ts 0.00% 14 Missing ⚠️
...MigrationStatusVirtualMachineList/utils/fields.tsx 0.00% 5 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2467       +/-   ##
===========================================
- Coverage   36.81%   17.45%   -19.37%     
===========================================
  Files         158     1271     +1113     
  Lines        2548    23718    +21170     
  Branches      599     4544     +3945     
===========================================
+ Hits          938     4139     +3201     
- Misses       1428    19568    +18140     
+ Partials      182       11      -171     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@locales/en/plugin__forklift-console-plugin.json`:
- Line 1041: The translation entry for the key 'PostMigrationSetup' currently
exposes the internal key as the user-facing string; update the JSON value for
"PostMigrationSetup" to a human-readable, hyphenated label like "Post-migration
setup" so getVMMigrationStatus() (which calls t('PostMigrationSetup')) shows the
correct UI/filter text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6a2c3e33-892e-4946-baf1-da4b3a196031

📥 Commits

Reviewing files that changed from the base of the PR and between 7fcc07e and 3d91639.

📒 Files selected for processing (11)
  • locales/en/plugin__forklift-console-plugin.json
  • locales/es/plugin__forklift-console-plugin.json
  • locales/fr/plugin__forklift-console-plugin.json
  • locales/ja/plugin__forklift-console-plugin.json
  • locales/ko/plugin__forklift-console-plugin.json
  • locales/zh/plugin__forklift-console-plugin.json
  • src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/components/MigrationStatusExpandedPage/components/MigrationProgressTable/MigrationProgressTable.tsx
  • src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/constants.ts
  • src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/fields.tsx
  • src/plans/details/tabs/VirtualMachines/components/MigrationStatusVirtualMachineList/utils/utils.ts
  • src/utils/constants.ts

"Post-migration hook": "Post-migration hook",
"Post-migration hook job template": "Post-migration hook job template",
"Post-migration setup": "Post-migration setup",
"PostMigrationSetup": "PostMigrationSetup",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix user-facing value for PostMigrationSetup translation key.

getVMMigrationStatus() uses t('PostMigrationSetup'), so this value is shown in UI/filter labels. Keeping it as "PostMigrationSetup" exposes the internal key instead of the intended readable status.

Suggested fix
-  "PostMigrationSetup": "PostMigrationSetup",
+  "PostMigrationSetup": "Post-migration setup",
As per coding guidelines, use consistent hyphenated “post-migration” wording for UI/i18n strings.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"PostMigrationSetup": "PostMigrationSetup",
"PostMigrationSetup": "Post-migration setup",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/en/plugin__forklift-console-plugin.json` at line 1041, The
translation entry for the key 'PostMigrationSetup' currently exposes the
internal key as the user-facing string; update the JSON value for
"PostMigrationSetup" to a human-readable, hyphenated label like "Post-migration
setup" so getVMMigrationStatus() (which calls t('PostMigrationSetup')) shows the
correct UI/filter text.

Source: Coding guidelines

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.

2 participants