cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

API: Fix pagination issue with listing LDAP configuration

Open Pearl1594 opened this issue 4 months ago • 18 comments

Description

This PR fixes issue with pagination when listing ldap configuration. When there are more than 20 entries and we want to list the 2nd page of ldap configs when using page size 20 , it returns the 1st 20 entries always.

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?

Pearl1594 avatar Aug 13 '25 16:08 Pearl1594

Codecov Report

:x: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 16.21%. Comparing base (79ebf69) to head (6f432d1).

Files with missing lines Patch % Lines
.../cloudstack/ldap/dao/LdapConfigurationDaoImpl.java 0.00% 9 Missing :warning:
.../org/apache/cloudstack/ldap/LdapConfiguration.java 0.00% 1 Missing :warning:
...va/org/apache/cloudstack/ldap/LdapManagerImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #11444   +/-   ##
=========================================
  Coverage     16.21%   16.21%           
  Complexity    13354    13354           
=========================================
  Files          5657     5657           
  Lines        498642   498643    +1     
  Branches      60520    60520           
=========================================
+ Hits          80868    80874    +6     
+ Misses       408754   408750    -4     
+ Partials       9020     9019    -1     
Flag Coverage Δ
uitests 4.00% <ø> (+<0.01%) :arrow_up:
unittests 17.07% <0.00%> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Aug 13 '25 16:08 codecov[bot]

@blueorangutan package

Pearl1594 avatar Aug 14 '25 13:08 Pearl1594

@Pearl1594 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.

blueorangutan avatar Aug 14 '25 13:08 blueorangutan

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

blueorangutan avatar Aug 14 '25 14:08 blueorangutan

@blueorangutan test keepEnv

DaanHoogland avatar Aug 14 '25 16:08 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Aug 14 '25 16:08 blueorangutan

[SF] Trillian test result (tid-14063) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 52352 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11444-t14063-kvm-ol8.zip Smoke tests completed. 140 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_13_retrieve_vr_default_files Error 1.13 test_diagnostics.py
test_14_retrieve_vr_one_file Error 1.13 test_diagnostics.py
test_15_retrieve_ssvm_default_files Error 1.13 test_diagnostics.py
test_16_retrieve_ssvm_single_file Error 1.13 test_diagnostics.py
test_17_retrieve_cpvm_default_files Error 1.14 test_diagnostics.py
test_18_retrieve_cpvm_single_file Error 1.14 test_diagnostics.py

blueorangutan avatar Aug 15 '25 07:08 blueorangutan

@Pearl, It does not seem to work, I think we must consider the option ro add a uuid to the API/records

DaanHoogland avatar Aug 15 '25 08:08 DaanHoogland

Seemed to be a UI issue. It works via cmk. Thanks for testing @DaanHoogland

Pearl1594 avatar Aug 15 '25 14:08 Pearl1594

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

blueorangutan avatar Aug 15 '25 16:08 blueorangutan

@Pearl1594 , the pagination works but no it reveals new issues, sorting does not work beyond the page we are looking at. I do not consider this a big issues as most installations will not have enormous amounts of ldap configurations, but still it seems like a(nother) justifications for giving ldapconfigurations a proper uuid. That said, lgtm.

DaanHoogland avatar Aug 18 '25 09:08 DaanHoogland

@blueorangutan test

DaanHoogland avatar Aug 18 '25 09:08 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Aug 18 '25 09:08 blueorangutan

[SF] Trillian Build Failed (tid-14077)

blueorangutan avatar Aug 18 '25 09:08 blueorangutan

@blueorangutan package

DaanHoogland avatar Dec 12 '25 09:12 DaanHoogland

@DaanHoogland 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.

blueorangutan avatar Dec 12 '25 09:12 blueorangutan

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

blueorangutan avatar Dec 12 '25 11:12 blueorangutan

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

blueorangutan avatar Dec 12 '25 14:12 blueorangutan