Skip to content

Conversation

DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Jul 4, 2025

Description

This PR fixes: #3777 using ai help a lot of code in comments was removed. By far not complete yet as “token expired”. Also I had to revert a lot of the suggestions as they where either completely invalid or not relevant to the premise “not-explanetary code in comment” , like diamond operators 🤯 or log rephrasing 😡 .

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 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 cleans up commented-out code across multiple modules and updates various comment headers and Javadoc links.

  • Removed leftover debug and commented code in Java and Python files
  • Corrected license header comments in API commands
  • Updated Javadoc @see link formatting

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
utils/src/main/java/com/cloud/utils/xmlobject/XmlObjectParser.java Removed commented-out debug System.out.println
utils/src/main/java/com/cloud/utils/xmlobject/XmlObject.java Removed commented-out debug System.out.println
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/template/UploadManagerImpl.java Removed commented-out method call
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java Removed commented-out path logic
services/console-proxy/rdpconsole/src/main/java/vncclient/vnc/Vnc33Hello.java Removed commented debug properties
services/console-proxy/rdpconsole/src/main/java/rdpclient/rdp/ClientConfirmActivePDU.java Updated Javadoc @see link formatting
services/console-proxy/rdpconsole/src/main/java/rdpclient/clip/ClipboardDataFormat.java Removed commented-out clipboard formats
services/console-proxy/rdpconsole/src/main/java/rdpclient/RdpClient.java Removed commented-out debug override
scripts/vm/hypervisor/xenserver/xenserver56fp1/NFSSR.py Removed commented-out directory-creation logic
scripts/vm/hypervisor/xenserver/xcpserver/NFSSR.py Removed commented-out directory-creation logic
scripts/vm/hypervisor/xenserver/xcposs/NFSSR.py Removed commented-out directory-creation logic
scripts/vm/hypervisor/xenserver/perfmon.py Removed commented-out XenAPI pool code
scripts/vm/hypervisor/ovm3/cloudstack.py Removed commented-out OVS agent commands
plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/util/StorPoolHelper.java Removed commented-out custom logger setup
plugins/storage/volume/nexenta/src/main/java/org/apache/cloudstack/storage/datastore/driver/NexentaPrimaryDataStoreDriver.java Removed commented-out DAO update call
plugins/network-elements/juniper-contrail/src/test/java/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java Simplified exception handling in test mock
plugins/network-elements/cisco-vnmc/src/main/java/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java Removed commented-out XML concatenation logic
engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java Removed commented-out constructor calls
engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java Removed redundant super() call
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java Removed commented ISO-handling code
api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java Corrected license header comment
api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java Corrected license header comment
api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatePermissionsCmdByAdmin.java Corrected license header comment
api/src/main/java/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java Corrected license header comment
Comments suppressed due to low confidence (2)

services/console-proxy/rdpconsole/src/main/java/rdpclient/rdp/ClientConfirmActivePDU.java:30

  • [nitpick] The Javadoc link text is not descriptive; consider updating the anchor text to something like 'MSDN documentation for Client Confirm Active PDU' to improve clarity.
 * @see <a href="http://msdn.microsoft.com/en-us/library/cc240488.aspx">microsoft msdn explanation</a>

api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java:1

  • The license header seems incomplete and ends abruptly; please restore the full standard ASF header (e.g., 'under one or more contributor license agreements').
// Licensed to the Apache Software Foundation (ASF) under one

@codecov
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.29%. Comparing base (d7b7bd5) to head (1835662).
⚠️ Report is 116 commits behind head on main.

Files with missing lines Patch % Lines
.../cloud/network/CiscoNexusVSMDeviceManagerImpl.java 0.00% 1 Missing ⚠️
...er/src/main/java/com/cloud/test/IPRangeConfig.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11145      +/-   ##
============================================
- Coverage     17.35%   17.29%   -0.07%     
- Complexity    15231    15249      +18     
============================================
  Files          5885     5889       +4     
  Lines        525611   526126     +515     
  Branches      64160    64235      +75     
============================================
- Hits          91224    90969     -255     
- Misses       424090   424857     +767     
- Partials      10297    10300       +3     
Flag Coverage Δ
uitests 3.62% <ø> (-0.01%) ⬇️
unittests 18.32% <0.00%> (-0.07%) ⬇️

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

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

minor comments added, overall LGTM

@@ -1,4 +1,4 @@
// Licensedname = "listIsoPermissions", to the Apache Software Foundation (ASF) under one
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Member

Choose a reason for hiding this comment

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

@DaanHoogland Just curious why the rat check didn't pick this up. Do we need any update in the github action?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe, it's not checking the license content

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or it found the needed string and the extra bit doesn’t matter…?

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

Copy link
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.

clgtm

@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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 15101

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.16 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 36.46 test_kubernetes_clusters.py
test_01_isolate_network_FW_PF_default_routes_egress_true Failure 107.68 test_routers_network_ops.py
test_02_isolate_network_FW_PF_default_routes_egress_false Failure 198.11 test_routers_network_ops.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-14394)
Environment: kvm-ubuntu22 (x2), zone: Advanced Networking with Mgmt server u22
Total time taken: 61330 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11145-t14394-kvm-ubuntu22.zip
Smoke tests completed. 146 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.18 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 39.38 test_kubernetes_clusters.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-14395)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 63244 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11145-t14395-vmware-70u3.zip
Smoke tests completed. 144 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.18 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 33.19 test_kubernetes_clusters.py
test_01_ssl_offloading_isolated_network Failure 797.37 test_ssl_offloading.py
test_02_ssl_offloading_project_vpc Failure 775.56 test_ssl_offloading.py
test_01_vpn_usage Error 1.10 test_usage.py

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test ol8 xcpng82

@apache apache deleted a comment from blueorangutan Sep 20, 2025
@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_01_events_resource Error 209.60 test_events_resource.py
test_03_deploy_and_scale_kubernetes_cluster Failure 1.18 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 66.17 test_kubernetes_clusters.py
test_01_non_strict_host_anti_affinity Error 193.63 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 55.58 test_nonstrict_affinity_group.py
test_01_primary_storage_iscsi Error 0.88 test_primary_storage.py
test_01_volume_usage Failure 94.91 test_usage.py
test_01_vpn_usage Error 1.10 test_usage.py
test_11_destroy_vm_and_volumes Error 19.93 test_vm_life_cycle.py
test_01_migrate_vm_strict_tags_success Error 178.77 test_vm_strict_host_tags.py

@harikrishna-patnala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@harikrishna-patnala
Copy link
Contributor

we may move this PR to 4.22.1 as this has touched many files and no functional changes but it may cause trouble for existing PRs with conflicts. cc @DaanHoogland @weizhouapache

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor Author

we may move this PR to 4.22.1 as this has touched many files and no functional changes but it may cause trouble for existing PRs with conflicts. cc @DaanHoogland @weizhouapache

makes sense but :( anyway ;|

@DaanHoogland
Copy link
Contributor Author

@harikrishna-patnala , how about last minute merge?

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.

lots of code in comment needs removing

6 participants