Skip to content

removed code in comments #11145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

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 dimand operators 🤯 or log refrasings 😡 .

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

@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

Copy link

codecov bot commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 16.47%. Comparing base (8e4fe1c) to head (51881bc).

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     16.57%   16.47%   -0.11%     
+ Complexity    13988    13955      -33     
============================================
  Files          5745     5745              
  Lines        510847   510790      -57     
  Branches      62140    62133       -7     
============================================
- Hits          84696    84136     -560     
- Misses       416677   417224     +547     
+ Partials       9474     9430      -44     
Flag Coverage Δ
uitests 3.91% <ø> (ø)
unittests 17.36% <0.00%> (-0.12%) ⬇️

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.

@DaanHoogland DaanHoogland force-pushed the ghi3777-codeInComments branch from 11067b5 to 51881bc Compare July 8, 2025 08:24
@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 ✖️ debian ✔️ suse15. SL-JID 14084

@blueorangutan
Copy link

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

@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-13715)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54483 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11145-t13715-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland DaanHoogland marked this pull request as ready for review July 9, 2025 07:43
@blueorangutan
Copy link

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

Test Result Time (s) Test File
ContextSuite context=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py
test_list_system_vms_metrics_history Failure 0.28 test_metrics_api.py

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_01_prepare_and_cancel_maintenance Error 0.16 test_ms_maintenance_and_safe_shutdown.py

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Error 364.31 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Error 364.32 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Error 453.54 test_internal_lb.py
test_12_vpc_and_tier_with_dynamic_routed_mode Failure 332.09 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 332.11 test_ipv4_routing.py
test_01_prepare_and_cancel_maintenance Error 0.44 test_ms_maintenance_and_safe_shutdown.py
test_01_deploy_vm_on_specific_host Error 37.28 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3603.07 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 4.44 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 13.67 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 3603.81 test_vm_deployment_planner.py
test_01_migrate_vm_strict_tags_success Error 3604.22 test_vm_strict_host_tags.py
test_02_migrate_vm_strict_tags_failure Error 5.71 test_vm_strict_host_tags.py
test_01_restore_vm_strict_tags_success Error 23.34 test_vm_strict_host_tags.py
test_02_restore_vm_strict_tags_failure Error 3604.07 test_vm_strict_host_tags.py
test_01_scale_vm_strict_tags_success Error 19.13 test_vm_strict_host_tags.py
test_02_scale_vm_strict_tags_failure Error 3604.04 test_vm_strict_host_tags.py
test_01_deploy_vm_on_specific_host_without_strict_tags Error 17.11 test_vm_strict_host_tags.py
test_02_deploy_vm_on_any_host_without_strict_tags Error 3605.76 test_vm_strict_host_tags.py
test_03_deploy_vm_on_specific_host_with_strict_tags_success Error 4.03 test_vm_strict_host_tags.py
test_04_deploy_vm_on_any_host_with_strict_tags_success Error 7.50 test_vm_strict_host_tags.py

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
3 participants