Skip to content

cleanup LDAP code according to warnings #11436

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 4 commits into
base: main
Choose a base branch
from

Conversation

DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Aug 12, 2025

Description

This PR was part of investigation into the current LDAP workings, to find out that the issue under investigation was a user issue. I think this can be merged, but it has no functional changes.

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

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.63%. Comparing base (9fd2b90) to head (e561f60).
⚠️ Report is 13 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (9fd2b90) and HEAD (e561f60). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (9fd2b90) HEAD (e561f60)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #11436       +/-   ##
=============================================
- Coverage     17.36%    3.63%   -13.73%     
=============================================
  Files          5886      441     -5445     
  Lines        525645    37023   -488622     
  Branches      64156     6785    -57371     
=============================================
- Hits          91257     1345    -89912     
+ Misses       424093    35517   -388576     
+ Partials      10295      161    -10134     
Flag Coverage Δ
uitests 3.63% <ø> (ø)
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.

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

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland 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-14056)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 48278 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11436-t14056-kvm-ol8.zip
Smoke tests completed. 146 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 August 13, 2025 07:25
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 performs cleanup of the LDAP code according to compiler warnings. It removes unused methods, simplifies string concatenations, eliminates dead code, and modernizes various patterns without changing functionality.

  • Removes deprecated/unused methods and constructors
  • Simplifies string building patterns and improves logging
  • Updates method visibility and parameters for better consistency

Reviewed Changes

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

Show a summary per file
File Description
ADLdapUserManagerImplTest.java Updates test setup to use static mocking and fixes assertion methods
LinkAccountToLdapCmdTest.java Adds missing test assertion for account name
LdapListUsersCmdTest.java Fixes method name from isACloudstackUser to isACloudStackUser
LdapConfigurationDaoImpl.java Removes unused find method overload
LdapConfigurationDao.java Removes unused method signature and improves javadoc
OpenLdapUserManagerImpl.java Major refactoring: simplifies string building, uses static methods, improves logging
LdapUserManager.java Removes public modifiers from interface methods
LdapUser.java Makes memberships field final
LdapTrustMapVO.java Removes empty constructor and updates hashCode implementation
LdapManagerImpl.java Simplifies logging and removes unused method
LdapManager.java Removes unused method signature
LdapContextFactory.java Uses static methods for configuration access
LdapConfiguration.java Makes many methods static and removes deprecated constructor
LdapAuthenticator.java Improves logging and simplifies conditional logic
ADLdapUserManagerImpl.java Uses static configuration methods and improves string building
LinkAccountToLdapResponse.java Adds missing getter method
Various command classes Removes empty constructors, improves parameter documentation, and modernizes patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@DaanHoogland DaanHoogland marked this pull request as draft August 16, 2025 15:57
@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

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.

2 participants