Skip to content

Conversation

vishesh92
Copy link
Member

Description

When deploying an Instance from an ISO in a multi hypervisor env, hypervisor type selection is ignored and it selects the first hypervisor from the list.
This PR fixes the above bug which was introduced in #10773

Apart from the above, this PR updates the older api to getAPI & postAPI for ZoneWizardRegisterTemplate.

Generated summary

This pull request introduces updates to improve the handling of hypervisor changes in the UI and refactors API calls in the ZoneWizardRegisterTemplate.vue component for better code clarity and consistency. The most important changes include modifying event handlers for hypervisor updates, refactoring API utility usage, and ensuring proper state updates.

UI Improvements for Hypervisor Handling:

API Refactoring:

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92 vishesh92 requested review from Copilot, shwstppr and sureshanaparti and removed request for Copilot July 22, 2025 13:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where hypervisor type selection was ignored when deploying an Instance from an ISO in a multi-hypervisor environment, causing the system to always select the first hypervisor from the list. Additionally, it refactors API calls in the ZoneWizardRegisterTemplate component for better consistency.

  • Fixed hypervisor selection by correctly updating the form.hypervisor property instead of a standalone variable
  • Simplified event handling for hypervisor changes in the image selection component
  • Refactored API calls to use specific getAPI and postAPI functions instead of the generic api function

Reviewed Changes

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

File Description
ui/src/views/compute/DeployVM.vue Fixed hypervisor selection bug by updating form.hypervisor instead of standalone hypervisor variable
ui/src/views/compute/wizard/OsBasedImageSelection.vue Simplified event handler and fixed parameter passing for hypervisor changes
ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue Refactored API calls to use specific getAPI/postAPI functions for better code clarity

@vishesh92
Copy link
Member Author

@blueorangutan ui

@blueorangutan
Copy link

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

Copy link

codecov bot commented Jul 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.57%. Comparing base (6ad9296) to head (c2bd83a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11261      +/-   ##
============================================
- Coverage     16.57%   16.57%   -0.01%     
- Complexity    14057    14059       +2     
============================================
  Files          5772     5772              
  Lines        512939   512956      +17     
  Branches      62305    62308       +3     
============================================
- Hits          85033    85025       -8     
- Misses       418425   418450      +25     
  Partials       9481     9481              
Flag Coverage Δ
uitests 3.89% <ø> (-0.01%) ⬇️
unittests 17.47% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11261 (QA-JID-678)

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

code lgtm

@sureshanaparti
Copy link
Contributor

Verified the hypervisor selection from UI (of env with multiple hypervisors) in VM deployment using ISO.

@sureshanaparti sureshanaparti merged commit a710ff8 into apache:main Jul 23, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 23, 2025
@DaanHoogland DaanHoogland deleted the fixup-ui-ios-hypervisor-selection branch July 23, 2025 07:45
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants