Add new backup report feature - #13939
JoaoJandre wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #13939 +/- ##
=============================================
- Coverage 20.05% 3.72% -16.33%
=============================================
Files 6427 489 -5938
Lines 584905 42316 -542589
Branches 71658 8033 -63625
=============================================
- Hits 117278 1577 -115701
+ Misses 454802 40513 -414289
+ Partials 12825 226 -12599
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
GaOrtiga
left a comment
There was a problem hiding this comment.
@JoaoJandre I ran some tests, overall LGTM, just a few minor nits
If a backup was created within the gathered period, but has been removed after, it appears as a deleted backup and shows 0 total storage. Given that the deletion happened after the period, it should show as a succesful backup. Same for a failed backup, where the failure reason is not showed.
API return
(admin) 🐱 > get backupreport startdate='2026-08-01' enddate='2026-08-23T11:59:59-0300' domainid=517e680a-dc14-4cac-98ab-5b6a21a2ac36
{
"backupreport": {
"backupstoragetotal": 0,
"domainreport": [
{
"accountreport": [
{
"account": "userc",
"accountid": "62f2b1f0-4373-4983-84a0-5e74b1558002",
"backupstoragetotal": 0,
"deletedbackup": [
{
"backupofferingname": "a",
"created": "2026-08-23T11:25:46-0300",
"id": "05c18465-4986-4d85-a119-00a469c35cb7",
"name": "VM-75e8ffef-9ae6-47fb-bca8-b1724fab8f63-2026-08-24T11:25:45.937948704-03:00",
"removed": "2026-08-24T11:30:21-0300",
"virtualmachineid": "75e8ffef-9ae6-47fb-bca8-b1724fab8f63",
"virtualmachinename": "VM-75e8ffef-9ae6-47fb-bca8-b1724fab8f63",
"zone": "zone",
"zoneid": "b25d0ef2-b171-4885-beec-21a27044f07c"
}
],
"failedbackup": [],
"sucessfulbackup": []
}
],
"backupstoragetotal": 0,
"domain": "c",
"domainid": "517e680a-dc14-4cac-98ab-5b6a21a2ac36"
}
],
"enddate": "2026-08-23T11:59:59-0300",
"providerinfo": [
{
"compressionreport": []
},
{
"validationreport": []
}
],
"schedulereport": [],
"startdate": "2026-08-01T00:00:00-0300"
}
}
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
|
||
| public class Upgrade42210to42300 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate { | ||
|
|
||
| // This must be moved to the new upgrade class when 4.23 is released |
There was a problem hiding this comment.
Please update/resolve conflicts and fix the upgrade path
There was a problem hiding this comment.
the upgrade path to 24 is not created still. #14033. I'll update again when the PR is merged
Should be fixed now, can you test it? |
aaaf43a to
56c14a8
Compare
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Description
This PR adds a feature for periodically sending basic backup reports to operators. To enable backup reports, the environment's alert email settings must be configured beforehand. To configure the report task, the following settings have been added:
backup.report.task.enabledfalsebackup.report.periodbackup.report.periodminutes, as well as a forecast of the next execution of backup schedules that may potentially run during the nextbackup.report.periodminutes.1440backup.report.timeout10Additionally, the
getBackupReportAPI has been added to generate reports through the API. This API returns the report in the API response and does not send emails to operators. The API supports the following parameters:zoneiddomainidaccountidprojectid.projectidaccountid.startdateenddateThis API is only available to
Adminaccounts.API Usage Example
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Example generated email:
How Has This Been Tested?
getBackupReportAPI passing only startdate and enddategetBackupReportAPI specifying the domaingetBackupReportAPI specifying the accountgetBackupReportAPI specifying the project