apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Fix Listing backup schedules #9749

Closed Pearl1594 closed 1 month ago

Pearl1594 commented 1 month ago

Description

This PR fixes the issue with listing backup schedules caused by https://github.com/apache/cloudstack/pull/9451

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 15.78%. Comparing base (046870e) to head (e63029b). Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...api/command/user/backup/ListBackupScheduleCmd.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9749 +/- ## ========================================== Coverage 15.78% 15.78% - Complexity 12551 12553 +2 ========================================== Files 5625 5625 Lines 491972 491972 Branches 63764 63917 +153 ========================================== + Hits 77662 77673 +11 + Misses 405850 405837 -13 - Partials 8460 8462 +2 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9749/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/9749/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.03% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9749/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `16.60% <0.00%> (+<0.01%)` | :arrow_up: | 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.

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

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

DaanHoogland commented 1 month ago

@blueorangutan package

blueorangutan commented 1 month ago

@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 commented 1 month ago

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

DaanHoogland commented 1 month ago

@blueorangutan test keepEnv

blueorangutan commented 1 month ago

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

blueorangutan commented 1 month ago

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

Test Result Time (s) Test File
all_test_vpc_redundant Skipped --- test_vpc_redundant.py
all_test_vpc_router_nics Skipped --- test_vpc_router_nics.py
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
JoaoJandre commented 1 month ago

@Pearl1594 could you describe what happened before this patch and what tests were made to validate that this patch fixes the issue?

Pearl1594 commented 1 month ago

@JoaoJandre because of the incorrect check, it never listed any backup schedules even if there were present.

JoaoJandre commented 1 month ago

@JoaoJandre because of the incorrect check, it never listed any backup schedules even if there were present.

@Pearl1594 I see. So did you test that the solution fixes the issue completely? I ask because there are no tests on the PR description and nowhere else on the PR.

Pearl1594 commented 1 month ago

Yes, unfortunately this class wasn't covered with tests, and I didn't add any either. But this has at this point been manually tested considering the release is on-going. Probably I could add tests in a subsequent enhancement PR that I have already opened for 4.20.1.

JoaoJandre commented 1 month ago

Yes, unfortunately this class wasn't covered with tests, and I didn't add any either. But this has at this point been manually tested considering the release is on-going. Probably I could add tests in a subsequent enhancement PR that I have already opened for 4.20.1.

@Pearl1594 What I meant in my previous messages is that the PR is missing the description of the steps that you made to verify that this PR fixes the described issue, something like this: https://github.com/apache/cloudstack/pull/9662#pullrequestreview-2296340166

Pearl1594 commented 1 month ago

Ah, my bad. I didn't quite understand it. Manual test done:

  1. Created a Backup offering
  2. Created a VM and associated it to a backup offering
  3. Configured backup Schedule for the VM
  4. After Creating the schedule, move to the Scheduled Backups tab in the pop-up window. You should now be able to see the schedule(s) created. image (Which was, before this fix empty)