KNOX-1608: Remove gateway-adapter module#1263
Conversation
b56a562 to
6b48e5a
Compare
After removing the gateway-adapter module, two runtime references to the deleted org.apache.hadoop.gateway.* classes remained and would fail with ClassNotFoundException at topology deployment: - .github/workflows/build/conf/topologies/knoxldap.xml: main.ldapRealm pointed at org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm. This caused the Apache Knox Docker Compose Tests CI to fail. - gateway-service-definitions/.../elasticsearch/1.0.0/service.xml: the <dispatch> classname pointed at the adapter PassAllHeadersDispatch. Both adapter classes were pure delegating subclasses of their org.apache.knox.gateway.* counterparts (every method body was just super.<same>(args)) so swapping the FQCN is behavior-preserving.
Test Results28 tests 28 ✅ 3s ⏱️ Results for commit 93c366e. |
hanicz
left a comment
There was a problem hiding this comment.
@arunk-kumar Thank you for picking up this task.
- Please rebase the changes you are 14 commits behind
master. gateway-admin-ui/admin-ui/app/provider-config-wizard/ldap-provider-config.tsstill has twoorg.apache.hadoopreferences please fix those.
Nice catch, @hanicz ! I also found a couple more references to the old package name: The only one should remain is in |
|
Thanks @arunk-kumar! can I ask you the motivation behind this change? I would also recommend sending an email on the Knox dev mailing list discussing the change before we make this change (discuss thread). It is unlikely that someone might be using these packages but it is a breaking change and we should let people know before we make these changes. |
@arunk-kumar contacted me before he submitted his change and I assured this is ok as we planned to remove this module even earlier, but 3.0.0 will be a breaking change anyway due to the JDK 17 support. Thanks, @moresandeep, for bringing this up, this was a 100% valid point! |
Jira Link
KNOX-1608 - Remove gateway-adapter module
What changes were proposed in this pull request?
As outlined in KNOX-1608, the deprecated
gateway-adaptermodule has been completely unhooked from the parent and release build lifecycles, and its directory structure has been completely purged from the codebase.This module was originally retained as a compatibility bridge for old classpaths (
org.apache.hadoop.gateway) during historical package migrations and is no longer required for modern deployment targets.(Please fill in changes proposed in this fix)
How was this patch tested?
The patch was validated via full workspace compilation from the root directory to confirm that downstream packaging profiles (
gateway-release,gateway-docker) compile cleanly without the module:mvn clean install -DskipTests -Dspotbugs.skip=trueThe local build completes successfully with a green
BUILD SUCCESSflag.Additionally, a local unit test suite was executed. Flaky tests and environment-specific constraints were observed (notably JaCoCo bytecode mismatches with local JDK 24 and race conditions on high-speed Apple Silicon CPUs), but all core modules and non-environmental test trees compile and validate cleanly.
Integration Tests
N/A (Codebase technical debt cleanup; no new business logic or operational endpoints introduced).
UI changes
N/A
Please review Knox Contributing Process before opening a pull request.