Skip to content

Allow multiple backup schedules of the same type#13663

Open
JoaoJandre wants to merge 1 commit into
apache:mainfrom
scclouds:add-multiple-backup-schedule
Open

Allow multiple backup schedules of the same type#13663
JoaoJandre wants to merge 1 commit into
apache:mainfrom
scclouds:add-multiple-backup-schedule

Conversation

@JoaoJandre

Copy link
Copy Markdown
Contributor

Description

This PR adds the ability to create multiple backup schedules of the same type for VMs. To support this operation, the ability to configure the limit of backup schedules that can be created with a given backup offering has also been added. The maxschedules parameter has been added to the updateBackupOffering and importBackupOffering APIs; this parameter accepts a map of schedule types to the maximum number that can be created.

Additionally, the ability to edit specific schedules via the GUI has been added. It is important to note that different schedules of the same type are not allowed to have the same time.

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):

Example of how the schedule limits can be configured through the GUI
image

How Has This Been Tested?

  • Configured a offering to have more than 1 as the limit for all of the schedule types.
  • Created multiple schedules of each type for a VM
  • Verified that all of the backups where created, with correct schedule IDs on the database.
  • Updated schedules and confirmed that the specified schedule was updated.
  • Tried updating using VM ID and schedule type (old behavior) and verified it worked.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.03371% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.64%. Comparing base (75748a5) to head (7586452).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...rg/apache/cloudstack/backup/BackupManagerImpl.java 38.09% 54 Missing and 11 partials ⚠️
...i/command/user/backup/UpdateBackupScheduleCmd.java 0.00% 41 Missing ⚠️
...i/command/user/backup/CreateBackupScheduleCmd.java 0.00% 13 Missing ⚠️
.../command/admin/backup/ImportBackupOfferingCmd.java 0.00% 5 Missing ⚠️
.../command/admin/backup/UpdateBackupOfferingCmd.java 16.66% 3 Missing and 2 partials ⚠️
...i/command/user/backup/CreateBackupOfferingCmd.java 0.00% 5 Missing ⚠️
...e/cloudstack/backup/dao/BackupScheduleDaoImpl.java 0.00% 2 Missing ⚠️
...org/apache/cloudstack/backup/BackupScheduleVO.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13663      +/-   ##
============================================
- Coverage     19.65%   19.64%   -0.01%     
  Complexity    19792    19792              
============================================
  Files          6368     6369       +1     
  Lines        575107   575392     +285     
  Branches      70370    70406      +36     
============================================
+ Hits         113016   113026      +10     
- Misses       449808   450074     +266     
- Partials      12283    12292       +9     
Flag Coverage Δ
uitests 3.40% <ø> (-0.02%) ⬇️
unittests 20.92% <23.03%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant