dbeaver/pro#9627 Refactor LDAP module - #4634
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 1 medium |
🟢 Metrics 140 complexity · 3 duplication
Metric Results Complexity 140 Duplication 3
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
🟡 Changes recommended
The updated backend build script has incorrect failure handling (can exit successfully on build failure), and the newly added LDAP icon resources are not consistently packaged/referenced.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Refactors the CloudBeaver LDAP authentication bundle by renaming the OSGi bundle/artifact and Java packages to io.cloudbeaver.service.auth.ldap, updating server feature/reactor references, and switching backend build scripts to use the shared dbeaver-common Maven Wrapper.
Changes:
- Renamed LDAP bundle coordinates (symbolic name/artifactId) and moved Java packages under
io.cloudbeaver.service.auth.ldap. - Updated product/feature and reactor module references to the new LDAP bundle id.
- Updated backend build scripts to invoke
dbeaver-common/mvnwinstead of relying on a systemmvn.
File summaries
| File | Description |
|---|---|
| server/product/aggregate/build-full.cmd | Switches Windows aggregate build to shared Maven Wrapper. |
| server/features/io.cloudbeaver.server.feature/feature.xml | Updates included LDAP plugin id to renamed bundle. |
| server/bundles/pom.xml | Updates reactor module name for renamed LDAP bundle. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/ssl/LdapSslSocketFactory.java | Updates package name + header year. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/ssl/LdapSslSetting.java | Updates package name + header year. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/LdapUtils.java | Updates package name. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/LdapSettings.java | Updates package/imports + header year. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/LdapSession.java | Updates package name + header year. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/LdapConstants.java | Updates package name + header year. |
| server/bundles/io.cloudbeaver.service.auth.ldap/src/io/cloudbeaver/service/auth/ldap/LdapAuthProvider.java | Updates package/imports to renamed ldap namespace. |
| server/bundles/io.cloudbeaver.service.auth.ldap/pom.xml | Renames Maven artifactId to match new bundle id. |
| server/bundles/io.cloudbeaver.service.auth.ldap/plugin.xml | Updates extension class reference to renamed Java package. |
| server/bundles/io.cloudbeaver.service.auth.ldap/OSGI-INF/l10n/bundle.properties | Adds English localization for LDAP auth properties. |
| server/bundles/io.cloudbeaver.service.auth.ldap/OSGI-INF/l10n/bundle_ru.properties | Adds Russian localization for LDAP auth properties. |
| server/bundles/io.cloudbeaver.service.auth.ldap/META-INF/MANIFEST.MF | Renames bundle symbolic name, exports, and automatic module name. |
| server/bundles/io.cloudbeaver.service.auth.ldap/icons/ldap.svg | Adds an LDAP icon asset. |
| server/bundles/io.cloudbeaver.service.auth.ldap/build.properties | Introduces PDE build includes list for the renamed bundle. |
| deploy/build.bat | Switches Windows deployment build to shared Maven Wrapper. |
| deploy/build-backend.sh | Switches backend deployment build to shared Maven Wrapper. |
Review details
Suppressed comments (1)
server/bundles/io.cloudbeaver.service.auth.ldap/plugin.xml:10
icons/ldap.svgwas added to this bundle, but the auth provider still references the icon fromorg.jkiss.dbeaver.model. If the intent is to use the bundled icon (and avoid relying on an external bundle resource path), update the icon attribute accordingly.
- Files reviewed: 15/19 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The LDAP bundle’s build.properties currently references a non-existent schema/ directory and omits OSGI-INF/, which can exclude localization resources from the built plugin.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 15/19 changed files
- Comments generated: 1
- Review effort level: Lite
8866b8e to
7401824
Compare
7401824 to
1500bb5
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The updated Windows batch scripts have concrete robustness issues (working-directory-dependent wrapper path and broken error handling / missing :error label) that can cause builds to fail or proceed incorrectly.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
server/product/aggregate/build-full.cmd:4
- build-full.cmd currently calls the Maven Wrapper via a relative path that depends on the caller's current working directory. If the script is invoked from a different directory (e.g., from the repo root), the wrapper path will resolve incorrectly and the build will fail. Use the script directory (%~dp0) as the anchor for the relative path.
call "..\..\..\..\dbeaver-common\mvnw.cmd" clean verify -Dheadless-platform -T 1C
deploy/build.bat:49
- This line uses
|| goto :error, but the script has no:errorlabel (the file ends at line 82). If this command fails, the batch will hit "Label not found" rather than a controlled exit. Replace the goto with an errorlevel check (or add an:errorlabel).
call "%MVNW%" -f ..\apps\config-generator compile exec:java -Dconfig.output="cloudbeaver\conf\cloudbeaver.conf" || goto :error
- Files reviewed: 15/19 changed files
- Comments generated: 1
- Review effort level: Lite
…actor-cloudbeaver-modules
Closes dbeaver/pro#9627
Summary
io.cloudbeaver.service.auth.ldapValidation
git diff --check