You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2025/03/21 11:30:08 UTC

[PR] ui: fix considerlasthost for start vm [cloudstack]

shwstppr opened a new pull request, #10602:
URL: https://github.com/apache/cloudstack/pull/10602

   ### Description
   
   Fixes #10601
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] 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?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#discussion_r2007399831


##########
ui/src/views/compute/StartVirtualMachine.vue:
##########
@@ -237,7 +237,7 @@ export default {
           id: this.resource.id
         }
         for (const key in values) {
-          if (values[key]) {
+          if (values[key] || values[key] === false) {

Review Comment:
   @bernardodemarco It may be there because some fields may have an empty value which we shouldn't pass to the API



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743816976

   Thanks guys for group action pointers. Will check and update.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "bernardodemarco (via GitHub)" <gi...@apache.org>.
bernardodemarco commented on code in PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#discussion_r2007394795


##########
ui/src/views/compute/StartVirtualMachine.vue:
##########
@@ -237,7 +237,7 @@ export default {
           id: this.resource.id
         }
         for (const key in values) {
-          if (values[key]) {
+          if (values[key] || values[key] === false) {

Review Comment:
   Couldn't we simply remove this if condition? I don't see how a form's field value could be `null` or `undefined` here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743111728

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/10602?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.28%. Comparing base [(`95c2481`)](https://app.codecov.io/gh/apache/cloudstack/commit/95c24810ab43810550ed70b3ebc4ba131082f7d3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`8fe8e99`)](https://app.codecov.io/gh/apache/cloudstack/commit/8fe8e99f05bc30eb1da63bc452e06bda4ee5743f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 6 commits behind head on 4.19.
   
   > :exclamation:  There is a different number of reports uploaded between BASE (95c2481) and HEAD (8fe8e99). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (95c2481) | HEAD (8fe8e99) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.19   #10602       +/-   ##
   =============================================
   - Coverage     15.16%    4.28%   -10.88%     
   =============================================
     Files          5414      368     -5046     
     Lines        474804    29656   -445148     
     Branches      57909     5207    -52702     
   =============================================
   - Hits          72002     1272    -70730     
   + Misses       394749    28239   -366510     
   + Partials       8053      145     -7908     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/10602/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/10602/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.28% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/10602/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/10602?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743099216

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2746948690

   UI build: :heavy_check_mark:
   Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10602 (QA-JID-582)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743136816

   UI build: :heavy_check_mark:
   Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10602 (QA-JID-579)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2746924067

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743096469

   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2743244823

   > @shwstppr, I think that we should also tackle this bug when starting VMs through group actions.
   > 
   > I debugged the current behavior of the `AutogenView` component. On this block of code:
   > 
   > https://github.com/apache/cloudstack/blob/6c40a7bebbc4c9d4dd9c96769834ad4b9c6cb6c7/ui/src/views/AutogenView.vue#L1443-L1447
   > 
   > The `paramsList` variable contains the `considerlasthost` parameter as `undefined` and, thus, it is not sent within the API request. To handle that, we could, in the following `groupMap` field:
   > 
   > https://github.com/apache/cloudstack/blob/6c40a7bebbc4c9d4dd9c96769834ad4b9c6cb6c7/ui/src/config/section/compute.js#L116-L124
   > 
   > Check whether `values.considerlasthost` is `undefined`. If so, the `considerlasthost` field could be set as `false`.
   > 
   > Edit: The bug when starting VMs through group actions occurs when the form is opened, and the `considerlasthost` field is not changed. If the field is set to `true` and switched back to `false`, then the UI sets the `considerlasthost` parameter correctly to `false`.
   
   good point.
   this is indeed a bug


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#issuecomment-2746922896

   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ui: fix considerlasthost for start vm [cloudstack]

Posted by "bernardodemarco (via GitHub)" <gi...@apache.org>.
bernardodemarco commented on code in PR #10602:
URL: https://github.com/apache/cloudstack/pull/10602#discussion_r2007417728


##########
ui/src/views/compute/StartVirtualMachine.vue:
##########
@@ -237,7 +237,7 @@ export default {
           id: this.resource.id
         }
         for (const key in values) {
-          if (values[key]) {
+          if (values[key] || values[key] === false) {

Review Comment:
   Okay. Specifically in this form, in which all fields are select components (except for the `considerlasthost`), the UI does not allow the values to be empty.
   
   However, I think that's a great idea to keep the if statement how you proposed, since that we could, in the future, add more fields to the form that can accept empty/nullable values



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org