Skip to content

Fix Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0#12777

Open
abh1sar wants to merge 1 commit intoapache:4.22from
shapeblue:backup-upgrade
Open

Fix Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0#12777
abh1sar wants to merge 1 commit intoapache:4.22from
shapeblue:backup-upgrade

Conversation

@abh1sar
Copy link
Copy Markdown
Contributor

@abh1sar abh1sar commented Mar 10, 2026

Description

This PR fixes #12769

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?

  1. Created 4 data volumes on 4.20.
  2. Took a backup
  3. Upgrade to 4.22

Also tried running the new query manually on backed-up volumes containing data of 24 volumes.

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

@abh1sar
Copy link
Copy Markdown
Contributor Author

abh1sar commented Mar 10, 2026

@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
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.92%. Comparing base (5caf6cd) to head (fdc1e5f).
⚠️ Report is 37 commits behind head on 4.22.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12777      +/-   ##
============================================
+ Coverage     17.60%   17.92%   +0.31%     
- Complexity    15659    16179     +520     
============================================
  Files          5917     5949      +32     
  Lines        531394   534058    +2664     
  Branches      64970    65301     +331     
============================================
+ Hits          93575    95752    +2177     
- Misses       427269   427550     +281     
- Partials      10550    10756     +206     
Flag Coverage Δ
uitests 3.66% <ø> (-0.04%) ⬇️
unittests 19.03% <ø> (+0.35%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@blueorangutan
Copy link
Copy Markdown

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

@abh1sar abh1sar changed the base branch from main to 4.22 March 10, 2026 06:59
@abh1sar
Copy link
Copy Markdown
Contributor Author

abh1sar commented Mar 10, 2026

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@abh1sar 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
Copy link
Copy Markdown

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

@abh1sar abh1sar marked this pull request as ready for review March 10, 2026 11:33
@shwstppr shwstppr requested a review from Copilot March 26, 2026 11:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 an upgrade-time failure in the 4.20.1/4.20.2 → 4.21.0/4.22.0 database migration when the backup framework is in use, by eliminating reliance on GROUP_CONCAT() string-building that can exceed group_concat_max_len.

Changes:

  • Replaces manual JSON string concatenation using GROUP_CONCAT() with JSON_ARRAYAGG(JSON_OBJECT(...)) when backfilling backed_volumes in cloud.backups.
  • Applies the same change when backfilling backup_volumes in cloud.vm_instance, defaulting to '[]' for VMs with no volumes.

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

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

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

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0

5 participants