Skip to content

Allow multiple backup schedules of the same type - #13663

Open
JoaoJandre wants to merge 4 commits into
apache:mainfrom
scclouds:add-multiple-backup-schedule
Open

JoaoJandre wants to merge 4 commits 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 24.86188% with 136 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.90%. Comparing base (27722a5) to head (65a443c).

Files with missing lines Patch % Lines
...rg/apache/cloudstack/backup/BackupManagerImpl.java 40.74% 51 Missing and 13 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.91%   19.90%   -0.01%     
- Complexity    20175    20181       +6     
============================================
  Files          6372     6373       +1     
  Lines        577139   577426     +287     
  Branches      70682    70719      +37     
============================================
+ Hits         114913   114955      +42     
- Misses       449664   449898     +234     
- Partials      12562    12573      +11     
Flag Coverage Δ
uitests 3.69% <ø> (-0.02%) ⬇️
unittests 21.18% <24.86%> (+<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.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@abh1sar

abh1sar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@JoaoJandre can you please resolve conflicts and update the branch

@DaanHoogland DaanHoogland moved this from Ready to conflict/waiting in CloudStack Testing Sep 8, 2026
@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

This branch has not been deployed

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

Projects

Status: conflict/waiting

Development

Successfully merging this pull request may close these issues.

4 participants