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

Draft
wants to merge 9 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

All modified and coverable lines are covered by tests ✅

Project coverage is 3.90%. Comparing base (3e3a0c0) to head (808a322).
Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (3e3a0c0) and HEAD (808a322). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3e3a0c0) HEAD (808a322)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #11145       +/-   ##
=============================================
- Coverage     16.58%    3.90%   -12.68%     
=============================================
  Files          5743      414     -5329     
  Lines        510706    33743   -476963     
  Branches      62119     6065    -56054     
=============================================
- Hits          84689     1319    -83370     
+ Misses       416543    32266   -384277     
+ Partials       9474      158     -9316     
Flag Coverage Δ
uitests 3.90% <ø> (+<0.01%) ⬆️
unittests ?

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.

…ache/cloudstack/network/contrail/management/ManagementServerMock.java

Co-authored-by: Copilot <[email protected]>
@apache apache deleted a comment from blueorangutan Jul 5, 2025
@apache apache deleted a comment from blueorangutan Jul 5, 2025
@apache apache deleted a comment from blueorangutan Jul 5, 2025
@apache apache deleted a comment from blueorangutan Jul 5, 2025
@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 14052

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

Successfully merging this pull request may close these issues.

lots of code in comment needs removing
2 participants