Skip to content

[UI] Deploy VM: Restore preselection of the first available template #11207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nvazquez
Copy link
Contributor

Description

This PR restores the previous behavior on the Deploy VM view to select the first available template listed (has now changed on main branch)

Before the fix:
Screenshot 2025-07-15 at 14 36 34

After the fix:
Screenshot 2025-07-15 at 14 37 00

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?

  • Registered some templates
  • Tested Deploy VM view

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

@nvazquez
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

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

Copy link
Contributor

@slavkap slavkap 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. I haven't tested it

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.58%. Comparing base (f52e058) to head (d0093a6).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11207      +/-   ##
============================================
- Coverage     16.58%   16.58%   -0.01%     
  Complexity    14038    14038              
============================================
  Files          5758     5758              
  Lines        511733   511735       +2     
  Branches      62216    62217       +1     
============================================
  Hits          84871    84871              
- Misses       417389   417391       +2     
  Partials       9473     9473              
Flag Coverage Δ
uitests 3.90% <ø> (-0.01%) ⬇️
unittests 17.48% <ø> (ø)

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/11207 (QA-JID-670)

@DaanHoogland
Copy link
Contributor

@nvazquez , do we know why the behaviour has changed and this patch is needed?

Copy link
Member

@weizhouapache weizhouapache 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, not tested

I face this issue too

@nvazquez
Copy link
Contributor Author

Hi @DaanHoogland I don't think it an issue but I raised it as an improvement to preserve the usual template selection from previous versions (I realized when tried to deploy a VM and it complained that no template was selected). It may probably got changed with the guest OS selection refactor on the deploy VM view

@DaanHoogland
Copy link
Contributor

Hi @DaanHoogland I don't think it an issue but I raised it as an improvement to preserve the usual template selection from previous versions (I realized when tried to deploy a VM and it complained that no template was selected). It may probably got changed with the guest OS selection refactor on the deploy VM view

Yes @nvazquez , it is an obvious annoyance, I was just wondering what we overlooked that caused this regression.

@weizhouapache
Copy link
Member

Yes @nvazquez , it is an obvious annoyance, I was just wondering what we overlooked that caused this regression.

I think it is caused by one of the recent changes with DeployVM.vue

@DaanHoogland
Copy link
Contributor

code looks good @nvazquez
I see in QA that the template selected does not adhere to the os choosen, is this intended?
Screenshot 2025-07-16 at 16 34 39
Screenshot 2025-07-16 at 16 34 43

I am presuming this has nothing to do with this PR btw

@nvazquez
Copy link
Contributor Author

Thanks @DaanHoogland I'll double check this

@nvazquez
Copy link
Contributor Author

Hi @DaanHoogland the QA server is on 4.20.0 and doesn't have the needed tables/columns for the new Guest OS selection filtering on the Deploy VM view. Can you please test on a main branch env?

@DaanHoogland
Copy link
Contributor

Hi @DaanHoogland the QA server is on 4.20.0 and doesn't have the needed tables/columns for the new Guest OS selection filtering on the Deploy VM view. Can you please test on a main branch env?

of course 🤦
will install a lab env.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 14218

@DaanHoogland
Copy link
Contributor

same question remains @nvazquez :

Screenshot 2025-07-17 at 10 38 05 Screenshot 2025-07-17 at 10 38 12

The template selected does not adhere to the os chosen, is this intended?

@shwstppr
Copy link
Contributor

@nvazquez I think it will be better if preselect the first template just after the API response. Somewhere in fetchImages or fetchAllTemplates in DeployVm/DeployVnf/CreateAutoscaleGroup, etc
Otherwise, this is okay too if works fine.

@nvazquez
Copy link
Contributor Author

@DaanHoogland it looks intended as it hasn't changed - this PR just selects the first template from the list of templates. I've checked on the current main that changing the guest OS acts as filtering but does not select any template:

Screen.Recording.2025-07-17.at.06.58.23.mov

Maybe this could be discussed separately? Anyways I don't think that is an issue, I think the guest OS is just a filter but should not change the selected template. cc @shwstppr

@shwstppr thanks I will try exploring that solution

@DaanHoogland
Copy link
Contributor

Maybe this could be discussed separately? Anyways I don't think that is an issue, I think the guest OS is just a filter but should not change the selected template. cc @shwstppr

sure @nvazquez , sound like a separate issue.

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

Successfully merging this pull request may close these issues.

8 participants