You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "winterhazel (via GitHub)" <gi...@apache.org> on 2023/09/18 20:35:45 UTC
[GitHub] [cloudstack] winterhazel opened a new pull request, #7974: Fix templates and ISOs listing pagination
winterhazel opened a new pull request, #7974:
URL: https://github.com/apache/cloudstack/pull/7974
### Description
After the changes in #4774, when an account other than the root admin lists templates/ISOs with pagination, count gets set to the number of items returned in that page. For example, when the user lists 10 templates/ISOs and 15 entries are found, in the first page, count is set to 10 (the number of items being returned), as opposed to 15 (the total number of items). As a result, the deploy VM wizard only shows the first page of templates/ISOs.
This PR fixes this behavior and makes count return the correct number of found entries.
### 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)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [X] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Everything has been tested in a local lab.
In the tested scenario, the following domains have templates:
- `ROOT`: 13 public and featured templates;
- `ROOT/test`: 4 public and featured templates.
<details>
<summary>
CloudMonkey command used to list templates.
</summary>
```
list templates templatefilter=featured page=1 pageSize=5
```
</details>
In every test, the expected number of templates/ISOs was returned.
With `share.public.templates.with.other.domains` set to `true` in both domains:
- In the root admin account, I listed the templates. I verified that the expected value of 17 was returned;
- In a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 17 was returned;
- In a user account belonging to `ROOT/test`, I listed the templates. I verified that the expected value of 17 was returned;
- I marked a template belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 16 was returned;
- I marked a template belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT/test`, I listed the templates. I verified that the expected value of 16 was returned;
- I marked a template belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 16 was returned;
- I marked a template belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT/test`, I listed the template. I verified that the expected value of 16 was returned.
With `share.public.templates.with.other.domains` set to `false` in both domains:
- In the root admin account, I listed the templates. I verified that the expected value of 17 was returned;
- In a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 13 was returned;
- In a user account belonging to `ROOT/test`, I listed the templates. I verified that the expected value of 4 was returned;
- I marked a template belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 12 was returned;
- I marked a template belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT/test`, I listed the templates. I verified that the expected value of 4 was returned;
- I marked a template belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT`, I listed the templates. I verified that the expected value of 13 was returned;
- I marked a template belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT/test`, I listed the template. I verified that the expected value of 3 was returned.
I also verified the behavior of the listIsos API. In the tested scenario, the following domains have ISOs:
- `ROOT`: 11 public and featured ISOs;
- `ROOT/test`: 2 public and featured ISOs.
<details>
<summary>
CloudMonkey command used to list ISOs.
</summary>
```
list isos page=1 pageSize=5 isoFilter=featured bootable=true
```
</details>
With `share.public.templates.with.other.domains` set to `true` in both domains:
- In the root admin account, I listed the ISOs. I verified that the expected value of 13 was returned;
- In a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 13 was returned;
- In a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 13 was returned;
- I marked an ISO belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 12 was returned;
- I marked an ISO belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 12 was returned;
- I marked an ISO belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 12 was returned;
- I marked an ISO belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 12 was returned.
With `share.public.templates.with.other.domains` set to `false` in both domains:
- In the root admin account, I listed the ISOs. I verified that the expected value of 13 was returned;
- In a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 11 was returned;
- In a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 2 was returned;
- I marked an ISO belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 10 was returned;
- I marked an ISO belonging to `ROOT` as not public. Then, in a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 2 was returned;
- I marked an ISO belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT`, I listed the ISOs. I verified that the expected value of 11 was returned;
- I marked an ISO belonging to `ROOT/test` as not public. Then, in a user account belonging to `ROOT/test`, I listed the ISOs. I verified that the expected value of 1 was returned.
I also verified the changes in the UI. Before, the deploy VM wizard showed only one page of templates/ISOs. After the changes, all pages are shown as expected.
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753426741
@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
[GitHub] [cloudstack] DaanHoogland commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1725039292
@blueorangutan test
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1738598048
@DaanHoogland a [SF] 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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1725041556
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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
[GitHub] [cloudstack] codecov[bot] commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1725006731
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/7974?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#7974](https://app.codecov.io/gh/apache/cloudstack/pull/7974?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (136fd66) into [4.18](https://app.codecov.io/gh/apache/cloudstack/commit/9c9b17885ff4ccf256fc6c515e612ce90cceace5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9c9b178) will **increase** coverage by `0.00%`.
> Report is 1 commits behind head on 4.18.
> The diff coverage is `70.00%`.
```diff
@@ Coverage Diff @@
## 4.18 #7974 +/- ##
=========================================
Coverage 13.06% 13.07%
- Complexity 9102 9108 +6
=========================================
Files 2720 2720
Lines 257469 257487 +18
Branches 40146 40149 +3
=========================================
+ Hits 33638 33659 +21
+ Misses 219605 219600 -5
- Partials 4226 4228 +2
```
| [Files Changed](https://app.codecov.io/gh/apache/cloudstack/pull/7974?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...a/com/cloud/api/query/dao/TemplateJoinDaoImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/7974?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2FwaS9xdWVyeS9kYW8vVGVtcGxhdGVKb2luRGFvSW1wbC5qYXZh) | `16.92% <50.00%> (+0.63%)` | :arrow_up: |
| [...ain/java/com/cloud/api/query/QueryManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/7974?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2FwaS9xdWVyeS9RdWVyeU1hbmFnZXJJbXBsLmphdmE=) | `3.75% <75.00%> (+0.72%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1754481733
@blueorangutan test
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1726438150
<b>[SF] Trillian test result (tid-7688)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43052 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7974-t7688-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_02_upgrade_kubernetes_cluster | `Failure` | 575.22 | test_kubernetes_clusters.py
--
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
[GitHub] [cloudstack] hsato03 commented on a diff in pull request #7974: Fix templates and ISOs listing pagination
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on code in PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#discussion_r1337812593
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -3782,11 +3781,62 @@ else if (!template.isPublicTemplate() && caller.getType() != Account.Type.ADMIN)
}
}
+ applyPublicTemplateSharingRestrictions(sc, caller);
+
return templateChecks(isIso, hypers, tags, name, keyword, hyperType, onlyReady, bootable, zoneId, showDomr, caller,
showRemovedTmpl, parentTemplateId, showUnique, searchFilter, sc);
}
+ /**
+ * If the caller is not a root admin, restricts the search to return only public templates from the domain which
+ * the caller belongs to and domains with the setting 'share.public.templates.with.other.domains' enabled.
+ */
+ protected void applyPublicTemplateSharingRestrictions(SearchCriteria<TemplateJoinVO> sc, Account caller) {
+ if (caller.getType() == Account.Type.ADMIN) {
+ s_logger.debug(String.format("Account [%s] is a root admin. Therefore, it has access to all public templates.", caller));
+ return;
+ }
+
+ List<TemplateJoinVO> publicTemplates = _templateJoinDao.listPublicTemplates();
+
+ Set<Long> unsharableDomainIds = new HashSet<>();
+ for (TemplateJoinVO template : publicTemplates) {
+ addDomainIdToSetIfDomainDoesNotShareTemplates(template.getDomainId(), caller, unsharableDomainIds);
+ }
+
+ if (!unsharableDomainIds.isEmpty()) {
+ s_logger.info(String.format("The public templates belonging to the domains [%s] will not be listed to account [%s] as they have the configuration [%s] marked as 'false'.", unsharableDomainIds, caller, QueryService.SharePublicTemplatesWithOtherDomains.key()));
+ sc.addAnd("domainId", SearchCriteria.Op.NOTIN, unsharableDomainIds.toArray());
+ }
+ }
+
+ /**
+ * Adds the provided domain ID the set if the domain does not share templates with the account. That is, if:
Review Comment:
```suggestion
* Adds the provided domain ID to the set if the domain does not share templates with the account. That is, if:
```
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1738781050
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753491578
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7285
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753389064
Code LGTM
--
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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1740155246
<b>[SF] Trillian test result (tid-7756)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 52974 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7974-t7756-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_01_invalid_upgrade_kubernetes_cluster | `Failure` | 3623.09 | test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster | `Failure` | 3615.24 | test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 0.06 | test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster | `Failure` | 0.03 | test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster | `Failure` | 0.03 | test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster | `Failure` | 0.03 | test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster | `Failure` | 0.03 | test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster | `Failure` | 50.90 | test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 126.40 | test_kubernetes_clusters.py
--
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
[GitHub] [cloudstack] DaanHoogland commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1738779092
@blueorangutan test
--
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
[GitHub] [cloudstack] DaanHoogland commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1738596251
@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] Fix templates and ISOs listing pagination [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1754482493
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1752821046
@shwstppr @DaanHoogland it would be interesting to have this fix on 4.19
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753214495
@hsato03 are you allright with this PR like this?
@winterhazel , did you get some 3rd party testing?
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1771788147
@DaanHoogland Yes, CLGTM.
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "gpordeus (via GitHub)" <gi...@apache.org>.
gpordeus commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1768729949
I have tested this PR by replicating the tests on my local lab. First, I tested on the current main and verified the problem was present. Then, I applied the changes and verified it had been fixed.
My scenario had the same amount of domains, templates and ISOs (`ROOT` with 13 and 11 and `ROOT/test` with 4 and 2), and I used the same commands to list templates and ISOs.
---
**Templates**:
<details>
<summary>Without the changes</summary>
With `share.public.templates.with.other.domains` set to true in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 17 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | 5 |
| ROOT/test | TestUser | 5 |

I marked one of the `ROOT` templates as non-public. It stopped showing in `templatefilter=featured` for all accounts:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 16 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | 5 |
| ROOT/test | TestUser | 5 |
With `share.public.templates.with.other.domains` set to false in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 17 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | Empty |
| ROOT/test | TestUser | Empty |

</details>
<details>
<summary>With the changes</summary>
With `share.public.templates.with.other.domains` set to true in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 17 |
| ROOT | User | 17 |
| ROOT/test | TestAdmin | 17 |
| ROOT/test | TestUser | 17 |

I marked one of the templates as non-public. It stopped showing in `templatefilter=featured` for all accounts. The first column indicates the domain of the non-public template:
Template Domain | Domain | Account | `count` |
| ------ | ------ | ------ | ------ |
| ROOT | ROOT | Admin | 16 |
| ROOT | ROOT | User | 16 |
| ROOT | ROOT/test | TestAdmin | 16 |
| ROOT | ROOT/test | TestUser | 16 |
| ROOT/test | ROOT | Admin | 16 |
| ROOT/test | ROOT | User | 16 |
| ROOT/test | ROOT/test | TestAdmin | 16 |
| ROOT/test | ROOT/test | TestUser | 16 |
With `share.public.templates.with.other.domains` set to false in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 17 |
| ROOT | User | 13 |
| ROOT/test | TestAdmin | 4 |
| ROOT/test | TestUser | 4 |
With `share.public.templates.with.other.domains` set to false in both domains. The first column indicates the domain of the non-public template:
Template Domain | Domain | Account | `count` |
| ------ | ------ | ------ | ------ |
| ROOT | ROOT | Admin | 16 |
| ROOT | ROOT | User | 12 |
| ROOT | ROOT/test | TestAdmin | 4 |
| ROOT | ROOT/test | TestUser | 4 |
| ROOT/test | ROOT | Admin | 16 |
| ROOT/test | ROOT | User | 13 |
| ROOT/test | ROOT/test | TestAdmin | 3 |
| ROOT/test | ROOT/test | TestUser | 3 |
</details>
---
**ISOs**:
<details>
<summary>Without the changes</summary>
With `share.public.templates.with.other.domains` set to true in both domains:
| Domain | Account | Count |
| ------ | ------ | ------ |
| ROOT | Admin | 13 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | 5 |
| ROOT/test | TestUser | 5 |

I marked one of the `ROOT` ISOs as non-public. It stopped showing in `isofilter=featured` for all accounts:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 12 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | 5 |
| ROOT/test | TestUser | 5 |
With `share.public.templates.with.other.domains` set to false in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 13 |
| ROOT | User | 5 |
| ROOT/test | TestAdmin | Empty |
| ROOT/test | TestUser | Empty |

</details>
<details>
<summary>With the changes</summary>
With `share.public.templates.with.other.domains` set to true in both domains:
| Domain | Account | `count` |
| ------ | ------ | ------ |
| ROOT | Admin | 13 |
| ROOT | User | 13 |
| ROOT/test | TestAdmin | 13 |
| ROOT/test | TestUser | 13 |

I marked one of the ISOs as non-public. It stopped showing in `isofilter=featured`, for all accounts. The first column indicates the domain of the non-public ISO:
ISO Domain | Domain | Account | Count |
| ------ | ------ | ------ | ------ |
| ROOT | ROOT | Admin | 12 |
| ROOT | ROOT | User | 12 |
| ROOT | ROOT/test | TestAdmin | 12 |
| ROOT | ROOT/test | TestUser | 12 |
| ROOT/test | ROOT | Admin | 12 |
| ROOT/test | ROOT | User | 12 |
| ROOT/test | ROOT/test | TestAdmin | 12 |
| ROOT/test | ROOT/test | TestUser | 12 |
With `share.public.templates.with.other.domains` set to false in both domains:
| Domain | Account | Count |
| ------ | ------ | ------ |
| ROOT | Admin | 13 |
| ROOT | User | 11 |
| ROOT/test | TestAdmin | 2 |
| ROOT/test | TestUser | 2 |
I marked one of the ISOs as non-public. It stopped showing with `isofilter=featured` for all accounts. The first column indicates the domain of the non-public ISO:
ISO Domain | Domain | Account | Count |
| ------ | ------ | ------ | ------ |
| ROOT | ROOT | Admin | 12 |
| ROOT | ROOT | User | 10 |
| ROOT | ROOT/test | TestAdmin | 2 |
| ROOT | ROOT/test | TestUser | 2 |
| ROOT/test | ROOT | Admin | 12 |
| ROOT/test | ROOT | User | 11 |
| ROOT/test | ROOT/test | TestAdmin | 1 |
| ROOT/test | ROOT/test | TestUser | 1 |
</details>
---
My testing yielded the same results. The only caveat is that the featured not-public templates do not show under the featured filter to anyone. However, this situation was observed even without the patch; therefore, it is outside the scope of this PR,
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1755979807
<b>[SF] Trillian test result (tid-7896)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41089 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7974-t7896-kvm-centos7.zip
Smoke tests completed. 113 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753401538
> @winterhazel , did you get some 3rd party testing?
@DaanHoogland yes, some users have tested these changes; I will ask them to report the results 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] Fix templates and ISOs listing pagination [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1753427402
@DaanHoogland a [SF] 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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1738684714
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7149
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1757027270
> > @winterhazel , did you get some 3rd party testing?
>
> @DaanHoogland yes, some users have tested these changes; I will ask them to report the results here.
It would be nice to see those, thanks.
--
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
[GitHub] [cloudstack] DaanHoogland commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1724929395
@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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1724931642
@DaanHoogland a [SF] 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
[GitHub] [cloudstack] blueorangutan commented on pull request #7974: Fix templates and ISOs listing pagination
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1725007903
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7057
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1770253769
@hsato03 Do you think this is ready for merge, now?
--
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 templates and ISOs listing pagination [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974
--
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