You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "vishesh92 (via GitHub)" <gi...@apache.org> on 2026/05/19 07:55:01 UTC
[PR] Fix listing of resorces for ASG belonging to a project [cloudstack]
vishesh92 opened a new pull request, #13187:
URL: https://github.com/apache/cloudstack/pull/13187
### Description
This PR fixes #12978
This PR resolves missing project scopes issues within the AutoScale UI components (AutoScaleVmProfile.vue, AutoScaleUpPolicyTab.vue, and AutoScaleDownPolicyTab.vue).
<details><summary>Generated Summary</summary>
<p>
This pull request improves the handling of project-scoped resources and enhances template name resolution in the AutoScale UI components. The main changes ensure that API requests include the `projectid` parameter when relevant, and that template names are accurately fetched and displayed, especially when templates may not be present in the local list.
**Project-aware API requests:**
* All API calls in `AutoScaleDownPolicyTab.vue`, `AutoScaleUpPolicyTab.vue`, and `AutoScaleLoadBalancing.vue` now include the `projectid` parameter if the resource is part of a project. This ensures correct data retrieval in multi-project environments. [[1]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL428-R435) [[2]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL440-R451) [[3]](diffhunk://#diff-2f0ad4d167a77a6e6150f6831733a88b28634c3d59868e2a0ac02940218c4daaL467-R482) [[4]](diffhunk://#diff-1c4178a87210408300869d4b9e7a815af232a633579e8a3c9b684098633b244fL465-R474) [[5]](diffhunk://#diff-1c4178a87210408300869d4b9e7a815af232a633579e8a3c9b684098633b244fL522-R533) [[6]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da31786e181cae22e84216eee0f5fafad2f9L428-R435) [[7]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da31786e181cae22e84216eee0f5fafad2f9L440-R451) [[8]](diffhunk://#diff-6a664b52c8461293b6cf6361d6c9da317
86e181cae22e84216eee0f5fafad2f9L467-R482)
* Similar updates in `AutoScaleVmProfile.vue` add `projectid` to template, VM profile, and related API requests for project-scoped resources. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR426-R428) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR443-R445) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL449-R469)
**Template name resolution improvements:**
* Replaces the previous method of looking up template names from a local list with an API call (`listTemplates`) to fetch the template name by `templateid`. If the template is not found, the raw `templateid` is displayed as a fallback. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR341) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL449-R469) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL471-R498) [[4]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bL65-R65)
**UI/UX enhancements:**
* After updating an AutoScale VM profile, the UI now refreshes profile data to reflect changes immediately and closes the modal dialog upon success. [[1]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR600-R613) [[2]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR632) [[3]](diffhunk://#diff-5248fbe61b0bb01a46790dbac4dd71a54045a35049b35ce3333130b33d9b951bR647)
* Prevents multiple concurrent updates by disabling the update action while loading.
These changes collectively improve the correctness and user experience of the AutoScale UI, especially for users working with project resources.
</p>
</details>
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### 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?
<!-- 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] Fix listing of resources for ASG belonging to a project [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4553126126
@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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4852114819
@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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-5323020921
@blueorangutan package
--
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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#discussion_r3504097087
##########
ui/src/views/compute/AutoScaleVmProfile.vue:
##########
@@ -468,13 +480,22 @@ export default {
this.loading = false
})
},
- getTemplateName (templateid) {
- for (const template of this.templatesList) {
- if (template.id === templateid) {
- return template.name
- }
+ fetchTemplate (templateid) {
+ if (!templateid) return
+ const params = {
+ id: templateid,
+ templatefilter: 'executable'
Review Comment:
`fetchTemplate` can leave a stale template name in the UI: it never clears `templateName`, it doesn’t handle API errors, and it can apply an out-of-date response if `templateid` changes while the request is in flight. This can cause the template name to be incorrect after switching profiles or after edits.
##########
ui/src/views/compute/AutoScaleVmProfile.vue:
##########
@@ -604,6 +629,7 @@ export default {
this.$pollJob({
jobId: response.updateautoscalevmprofileresponse.jobid,
successMethod: (result) => {
+ this.closeModal()
Review Comment:
`updateAutoScaleVmProfile` sets `loading=false` as soon as the initial API call returns (job submitted), which re-enables the update action while the async job is still running. Also, calling `closeModal()` here triggers an immediate `fetchData()` and then `closeModal` will be invoked again via the modal’s `afterClose`, causing duplicate refreshes.
--
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] Fix listing of resorces for ASG belonging to a project [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#discussion_r3274314338
##########
ui/src/views/compute/AutoScaleDownPolicyTab.vue:
##########
@@ -425,10 +425,14 @@ export default {
methods: {
fetchInitData () {
this.loading = true
- api('listAutoScaleVmGroups', {
+ const params = {
listAll: true,
id: this.resource.id
- }).then(response => {
+ }
+ if (this.resource.projectid) {
+ params.projectid = this.resource.projectid
+ }
+ api('listAutoScaleVmGroups', params).then(response => {
Review Comment:
this change happens a lot. should it be a method?
--
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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#discussion_r3765108797
##########
ui/src/views/compute/AutoScaleDownPolicyTab.vue:
##########
@@ -425,10 +425,14 @@ export default {
methods: {
fetchInitData () {
this.loading = true
- api('listAutoScaleVmGroups', {
+ const params = {
listAll: true,
id: this.resource.id
- }).then(response => {
+ }
+ if (this.resource.projectid) {
+ params.projectid = this.resource.projectid
+ }
+ api('listAutoScaleVmGroups', params).then(response => {
Review Comment:
ping @vishesh92 ?
--
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] Fix listing of resorces for ASG belonging to a project [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4485663050
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13187?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 4.15%. Comparing base ([`a7c2a05`](https://app.codecov.io/gh/apache/cloudstack/commit/a7c2a059f5d7517db78310bab48dcb2a6acd0924?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f26cbfe`](https://app.codecov.io/gh/apache/cloudstack/commit/f26cbfe50c05ae4d91d2bf05b4216bcb2af19efd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (a7c2a05) and HEAD (f26cbfe). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (a7c2a05) | HEAD (f26cbfe) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #13187 +/- ##
=============================================
- Coverage 16.27% 4.15% -12.13%
=============================================
Files 5665 404 -5261
Lines 500555 33008 -467547
Branches 60789 5907 -54882
=============================================
- Hits 81445 1370 -80075
+ Misses 410004 31462 -378542
+ Partials 9106 176 -8930
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13187/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/13187/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.15% <ø> (-0.01%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13187/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/13187?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] Fix listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4553278829
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13187 (QA-JID-941)
--
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] Fix listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4553130894
@DaanHoogland 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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-5323034753
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4852301600
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13187 (QA-JID-958)
--
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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-5323425654
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18893
--
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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187
--
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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#issuecomment-4852122611
@vishesh92 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 listing of resources for ASG belonging to a project [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on code in PR #13187:
URL: https://github.com/apache/cloudstack/pull/13187#discussion_r3795457036
##########
ui/src/views/compute/AutoScaleDownPolicyTab.vue:
##########
@@ -425,10 +425,14 @@ export default {
methods: {
fetchInitData () {
this.loading = true
- api('listAutoScaleVmGroups', {
+ const params = {
listAll: true,
id: this.resource.id
- }).then(response => {
+ }
+ if (this.resource.projectid) {
+ params.projectid = this.resource.projectid
+ }
+ api('listAutoScaleVmGroups', params).then(response => {
Review Comment:
this is already addressed. I added `addProjectFilter` in utils.
--
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