Skip to content

Conversation

@sureshanaparti
Copy link
Contributor

Description

This PR adds the procedure files for insert extensions and update guestos category.

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?

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

Copy link
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 adds new SQL stored procedures for managing extensions and guest OS categories in the CloudStack database schema. The procedures provide reusable database operations for inserting extensions, updating guest OS categories, and managing related details.

Changes:

  • Added procedures for inserting extensions and their associated details/custom actions
  • Added procedures for updating and managing guest OS categories
  • All procedures include idempotency checks to prevent duplicate entries

Reviewed changes

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

Show a summary per file
File Description
cloud.update_new_and_delete_old_category_for_guest_os.sql Adds procedure to migrate guest OS entries from one category to another and soft-delete the old category
cloud.update_category_for_guest_oses.sql Adds procedure to update guest OS entries to a new category based on display name matching
cloud.insert_extension_if_not_exists.sql Adds procedure to insert extension records if they don't already exist
cloud.insert_extension_detail_if_not_exists.sql Adds procedure to insert extension detail records if they don't already exist
cloud.insert_extension_custom_action_if_not_exists.sql Adds procedure to insert extension custom action records if they don't already exist
cloud.insert_extension_custom_action_details_if_not_exists.sql Adds procedure to insert extension custom action detail records if they don't already exist
cloud.insert_category_if_not_exists.sql Adds procedure to insert guest OS category records if they don't already exist

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

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.60%. Comparing base (1b2ae13) to head (bb914b1).
⚠️ Report is 3 commits behind head on 4.22.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12482      +/-   ##
============================================
- Coverage     17.60%   17.60%   -0.01%     
  Complexity    15618    15618              
============================================
  Files          5911     5911              
  Lines        530099   530126      +27     
  Branches      64776    64781       +5     
============================================
+ Hits          93313    93314       +1     
- Misses       426282   426309      +27     
+ Partials      10504    10503       -1     
Flag Coverage Δ
uitests 3.60% <ø> (ø)
unittests 18.67% <ø> (-0.01%) ⬇️

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.

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm, though the co-pilot comments mostly make sense they are not vital.

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor Author

sureshanaparti commented Jan 21, 2026

clgtm, though the co-pilot comments mostly make sense they are not vital.

@DaanHoogland these procedures (already tested / working ones) are from here - https://github.com/apache/cloudstack/blob/4.22/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql. ignoring the null validation suggestion there.

@blueorangutan
Copy link

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

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Not sure if we really need all these procedures but looks same as the original change.

minor comment on indentation

BEGIN
DECLARE action_id BIGINT UNSIGNED
; SELECT `eca`.`id` INTO action_id FROM `cloud`.`extension_custom_action` `eca`
JOIN `cloud`.`extension` `e` ON `e`.`id` = `eca`.`extension_id`
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is bit off. Is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, not intentional. I copied from upgrade schema file. let me check and fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed indentation, thanks for pointing out @shwstppr

@vishesh92 vishesh92 self-assigned this Jan 28, 2026
Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm.
tested that procedure exists after the installation and works as expected.

@sureshanaparti sureshanaparti force-pushed the add-procedures-to-files branch from a8e765f to 9bcc164 Compare January 28, 2026 10:30
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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

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

Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>
@vishesh92
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 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

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

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.

5 participants