Skip to content

Pull request comments#1541

Draft
roopakparikh wants to merge 1 commit intomainfrom
cursor/pull-request-comments-6461
Draft

Pull request comments#1541
roopakparikh wants to merge 1 commit intomainfrom
cursor/pull-request-comments-6461

Conversation

@roopakparikh
Copy link
Contributor

What this PR does / why we need it

This PR addresses previous review comments by replacing the error-prone auto-detection of firstboot script types with a robust backend validation. It prevents users from enabling firstboot scripts when a migration plan includes both Windows and Linux VMs, providing a clearer and more reliable approach.

Which issue(s) this PR fixes

fixes #

Special notes for your reviewer

  • Implemented ValidateMixedOSWithFirstboot() in migrationplanutils.go to check for mixed OS types (Windows/Linux) when a firstboot script is present.
  • The migrationplan_controller.go now calls this validation during migration plan processing.
  • A user-friendly error message is provided, guiding users to either remove the script or separate their migration plans by OS type.

Testing done

  • Code compiles successfully.
  • All tests passed.
  • Linter shows 0 issues.

Open in Cursor Open in Web

Addressed PR review feedback by replacing error-prone script OS detection
with backend validation that prevents users from using firstboot scripts
when both Windows and Linux VMs are selected in the same migration plan.

Changes:
- Added ValidateMixedOSWithFirstboot() validation function
- Validation checks for mixed OS types when firstboot script is provided
- Returns clear error message suggesting alternatives:
  1. Remove the firstboot script
  2. Migrate Windows and Linux VMs separately
  3. Create separate migration plans for each OS type

This approach is more reliable than auto-detection and provides better
user experience by catching the issue early during validation.

Fixes issue mentioned in PR comments.
@cursor
Copy link

cursor bot commented Feb 19, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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