Skip to content

Fix filter and pagination on API findStoragePoolsForMigration - #8306

Merged
DaanHoogland merged 1 commit into
apache:4.19from
scclouds:fix_parameters_findStoragePoolsForMigration
Feb 16, 2024
Merged

DaanHoogland merged 1 commit into
apache:4.19from
scclouds:fix_parameters_findStoragePoolsForMigration

Conversation

@GaOrtiga

@GaOrtiga GaOrtiga commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator

Description

When utilizing the findStoragePoolsForMigration API, ACS disregards the specified parameters keyword, page, and pagesize, returning all compatible storages for the volume. This issue also affected the UI, causing every available result to be shown during a migration, regardless of the filters or pagination applied.

To address this, modifications were implemented in the API to ensure the provided parameters are respected, guaranteeing that only the appropriate results are exhibited.

UI before

image

UI after

image

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

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

I tried migrating volumes both through the API and the UI and both worked accordingly.

@GaOrtiga GaOrtiga changed the title fix_filter_and_pagination Fix filter and pagination on API findStoragePoolsForMigration Dec 5, 2023

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland

Copy link
Copy Markdown
Contributor

@GaOrtiga should there be some UI change for this as well?

@GaOrtiga

GaOrtiga commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator Author

@GaOrtiga should there be some UI change for this as well?

@DaanHoogland It will not be necessary; the UI issues were a result of pagination problems within the API, which have now been resolved. Therefore, addressing the API issues fixed the problems encountered in the UI aswell.

I will edit the description of the PR to include screenshots of the before and after.

@GaOrtiga
GaOrtiga force-pushed the fix_parameters_findStoragePoolsForMigration branch from de702eb to abbb904 Compare December 5, 2023 13:39
@codecov

codecov Bot commented Dec 5, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (a15b706) 22.25% compared to head (abbb904) 23.14%.

Files Patch % Lines
.../storage/datastore/db/PrimaryDataStoreDaoImpl.java 40.00% 3 Missing and 3 partials ⚠️
...in/java/com/cloud/server/ManagementServerImpl.java 71.42% 1 Missing and 1 partial ⚠️
...torage/allocator/AbstractStoragePoolAllocator.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8306      +/-   ##
============================================
+ Coverage     22.25%   23.14%   +0.89%     
- Complexity    22439    23485    +1046     
============================================
  Files          5117     5117              
  Lines        346819   346830      +11     
  Branches      49790    49793       +3     
============================================
+ Hits          77190    80283    +3093     
+ Misses       258466   255009    -3457     
- Partials      11163    11538     +375     
Flag Coverage Δ
simulator-marvin-tests 24.80% <62.50%> (+0.96%) ⬆️
uitests 4.44% <ø> (ø)

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.

@JoaoJandre JoaoJandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested the pagination on the UI and it works as expected now.

@DaanHoogland DaanHoogland added this to the 4.19.1.0 milestone Jan 23, 2024
@yadvr

yadvr commented Feb 8, 2024

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test keepEnv

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

the usual suspects in the smoke test results:

Smoke tests completed. 127 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test Result Time (s) Test File
test_01_secure_vm_migration Error 283.48 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 231.87 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 115.95 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 115.95 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 0.02 test_vm_life_cycle.py
test_08_migrate_vm Error 49.06 test_vm_life_cycle.py
test_hostha_kvm_host_degraded Error 707.97 test_hostha_kvm.py
test_hostha_kvm_host_fencing Error 694.42 test_hostha_kvm.py

tested only with keyword search, but lgtm

@GutoVeronezi GutoVeronezi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLGTM

I just pointed out an optional small improvement.

@DaanHoogland
DaanHoogland changed the base branch from main to 4.19 February 16, 2024 10:14
@DaanHoogland
DaanHoogland merged commit 6f3e4e6 into apache:4.19 Feb 16, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Feb 23, 2024
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants