Skip to content

Don't set compressionstatus and validation status in backupVO and bac…#13661

Open
abh1sar wants to merge 2 commits into
mainfrom
hide-fields-kboss
Open

Don't set compressionstatus and validation status in backupVO and bac…#13661
abh1sar wants to merge 2 commits into
mainfrom
hide-fields-kboss

Conversation

@abh1sar

@abh1sar abh1sar commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

…kupsResponse for non-kboss providers.

These columns are hidden in UI if they are not set.

Description

This PR fixes #13660

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

How Has This Been Tested?

Created an Env with NAS plugin enabled.

Before fix:

Screenshot 2026-07-21 at 10 08 51 PM Screenshot 2026-07-21 at 10 08 29 PM

After fix:

Screenshot 2026-07-21 at 9 51 54 PM Screenshot 2026-07-21 at 9 52 03 PM

Removed the Nas offering and assigned the VM to a Kboss offering and took another backup.
The fields are visible now. The older NAS backups show the fields as empty instead of Uncompressed

Screenshot 2026-07-21 at 9 54 19 PM Screenshot 2026-07-21 at 9 54 13 PM

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

…kupsResponse for non-kboss providers.

These columns are hidden in UI if they are not set.
Copilot AI review requested due to automatic review settings July 21, 2026 17:08

Copilot AI 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.

Pull request overview

This PR addresses #13660 by preventing KBOSS-specific backup fields (compression/validation status) from being populated and shown for non-KBOSS backup providers, reducing misleading UI output.

Changes:

  • UI: Hide compressionstatus / validationstatus columns for VM backups unless the VM backup provider is kboss.
  • UI (generic list view): For listBackups, automatically drop KBOSS-only columns when the returned backup rows don’t include those fields.
  • Server: Only set compressionStatus / validationStatus (and uncompressedSize) in BackupResponse when the underlying Backup has non-null values; stop defaulting these fields in BackupVO, and explicitly set defaults only for KBOSS-created backups.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ui/src/views/compute/InstanceTab.vue Conditionally includes KBOSS-only backup columns based on dataResource.backupprovider.
ui/src/views/AutogenView.vue Removes KBOSS-only columns for listBackups when the returned items don’t contain KBOSS field data.
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java Avoids emitting compression/validation fields in API responses when they are null in the backup entity.
plugins/backup/kboss/src/main/java/org/apache/cloudstack/backup/KbossBackupProvider.java Explicitly initializes compression/validation statuses for KBOSS backups at creation time.
engine/schema/src/main/java/org/apache/cloudstack/backup/BackupVO.java Stops default-initializing compression/validation statuses for all backups; makes them explicitly provided when needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@abh1sar

abh1sar commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@winterhazel @weizhouapache can this be considered for 4.23 please?
The change is low risk and it addresses an issue that degrades user experience.

@abh1sar

abh1sar commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.64%. Comparing base (fc83241) to head (9f8b04d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...rg/apache/cloudstack/backup/BackupManagerImpl.java 0.00% 4 Missing and 2 partials ⚠️
...in/java/org/apache/cloudstack/backup/BackupVO.java 0.00% 3 Missing ⚠️
.../apache/cloudstack/backup/KbossBackupProvider.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13661      +/-   ##
============================================
- Coverage     19.64%   19.64%   -0.01%     
  Complexity    19789    19789              
============================================
  Files          6368     6368              
  Lines        575109   575116       +7     
  Branches      70371    70375       +4     
============================================
- Hits         112994   112987       -7     
- Misses       449829   449842      +13     
- Partials      12286    12287       +1     
Flag Coverage Δ
uitests 3.41% <ø> (-0.01%) ⬇️
unittests 20.92% <0.00%> (-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.

@winterhazel

Copy link
Copy Markdown
Member

@winterhazel @weizhouapache can this be considered for 4.23 please? The change is low risk and it addresses an issue that degrades user experience.

Asking @JoaoJandre's review on this one. I think we can include it.

@winterhazel
winterhazel requested a review from JoaoJandre July 21, 2026 17:25
@winterhazel

Copy link
Copy Markdown
Member

@abh1sar @JoaoJandre I think hiding these two columns when not using the KBOSS plugin is ok. A single suggestion: when using KBOSS, isn't it better to display Unknown in these columns for backups created using other providers, instead of an empty column with a gray circle? The way these are shown now may look like a bug.

@winterhazel winterhazel added this to the 4.23.0 milestone Jul 21, 2026
@blueorangutan

Copy link
Copy Markdown

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

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.50%
Branch coverage 18.66%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

Copilot AI review requested due to automatic review settings July 22, 2026 05:39
@abh1sar

abh1sar commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@abh1sar @JoaoJandre I think hiding these two columns when not using the KBOSS plugin is ok. A single suggestion: when using KBOSS, isn't it better to display Unknown in these columns for backups created using other providers, instead of an empty column with a gray circle? The way these are shown now may look like a bug.

Made the change. It appears like this now:
Screenshot 2026-07-22 at 11 07 48 AM

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@abh1sar

abh1sar commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

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.

Compression and Validation fields are misleading for other backup providers

6 participants