Skip to content

Conversation

@shwstppr
Copy link
Contributor

Description

This PR makes changes to allow updating details for an extension resource mapping, as other places where external metadata is added already allow updation. Currently, extensions only support Cluster to be registered therefore, changes have been added to updateCluster functionality.

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?

This PR makes changes for allowing updating details for an extension resource mapping.
Currently, extensions only support Cluster to be registered therefore changes has been added to updateCluster functionality.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 52.50000% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.00%. Comparing base (cca8b2f) to head (ef45b35).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/com/cloud/resource/ResourceManagerImpl.java 0.00% 10 Missing ⚠️
...work/extensions/manager/ExtensionsManagerImpl.java 77.77% 1 Missing and 5 partials ⚠️
...ck/api/command/admin/cluster/UpdateClusterCmd.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11303   +/-   ##
=========================================
  Coverage     16.99%   17.00%           
- Complexity    14715    14722    +7     
=========================================
  Files          5832     5832           
  Lines        517561   517618   +57     
  Branches      62982    62995   +13     
=========================================
+ Hits          87975    87997   +22     
- Misses       419651   419682   +31     
- Partials       9935     9939    +4     
Flag Coverage Δ
uitests 3.82% <ø> (-0.01%) ⬇️
unittests 17.95% <52.50%> (+<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.

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 enables updating extension resource mapping details for clusters through the updateCluster API. The enhancement allows modifying external configuration details for clusters that are registered with extensions, similar to functionality already available in other parts of the system.

Key changes include:

  • Added external details parameter support to the updateCluster API command
  • Enhanced the UI to display and edit extension resource mapping details for external hypervisor clusters
  • Implemented backend logic to compare and update extension resource map details

Reviewed Changes

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

Show a summary per file
File Description
api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java Added externalDetails parameter to support updating extension resource mapping details
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java Integrated extension resource map detail validation and update logic into cluster update flow
framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManager.java Added interface methods for checking and updating extension resource map details
framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImpl.java Implemented methods to compare existing details with new ones and perform updates
framework/extensions/src/test/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImplTest.java Added comprehensive unit tests for the new extension resource map detail update functionality
ui/src/views/infra/ClusterUpdate.vue Added UI form field to edit external details for clusters with external hypervisor type and extension ID
ui/src/views/extension/ExternalConfigurationDetails.vue Fixed condition to properly check for extension ID before loading configuration details

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala 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

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor

@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 ✔️ debian ✔️ suse15. SL-JID 14417

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Able to update the metadata of cluster of external type and change is also reflected at the extension level

Screenshot 2025-07-28 at 5 44 48 PM Screenshot 2025-07-28 at 5 48 56 PM

@shwstppr shwstppr marked this pull request as ready for review July 28, 2025 12:27
@sureshanaparti
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13940)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54822 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11303-t13940-kvm-ol8.zip
Smoke tests completed. 145 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@sureshanaparti sureshanaparti merged commit 4aed972 into apache:main Jul 29, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 29, 2025
@DaanHoogland DaanHoogland deleted the allow-updateextensionclustermap-details branch July 29, 2025 07:10
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
…pache#11303)

* api,server,extensions: allow updating extension resource map details

This PR makes changes for allowing updating details for an extension resource mapping.
Currently, extensions only support Cluster to be registered therefore changes has been added to updateCluster functionality.

Signed-off-by: Abhishek Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants