KNOX-1608: Remove gateway-adapter module#1263
Conversation
b56a562 to
6b48e5a
Compare
Test Results32 tests 32 ✅ 3s ⏱️ Results for commit fc6a8fd. ♻️ This comment has been updated with latest results. |
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! |
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.
Addresses review feedback on PR apache#1263: - gateway-admin-ui/.../ldap-provider-config.ts: LDAP wizard now generates topologies referencing org.apache.knox.gateway.shirorealm.* instead of the removed adapter package. - Test fixtures and assertions in gateway-server and gateway-topology-hadoop-xml migrated to org.apache.knox.gateway.* (topology-with-dispatch{,-parameters}.xml, TopologyRulesModuleTest, ProviderConfigurationParserTest, testDescriptor.xml, testDelete.xml, HadoopXmlResourceParserTest). - build-tools/.../spotbugs-filter.xml: removed the now-dead ~org.apache.hadoop.gateway..* exclusion. The only remaining occurrence is the historical KNOX-1553 entry in the CHANGES file, which is a release-notes reference and should not be rewritten.
93c366e to
fc6a8fd
Compare
|
Thanks @hanicz, @smolnar82 — rebased on master and cleaned up all remaining org.apache.hadoop.gateway references: gateway-admin-ui/.../ldap-provider-config.ts — LDAP wizard now emits org.apache.knox.gateway.shirorealm.* @moresandeep — Thanks for the guidance! I completely agree. I am starting a [DISCUSS] thread on the dev mailing list right now to outline the motivation and give the community a heads-up regarding the breaking change for 3.0.0. |
|
Thank you @smolnar82 @hanicz. As per @moresandeep, I've sent a heads-up to dev@knox.apache.org announcing this breaking change for 3.0.0. discuss thread : https://lists.apache.org/thread/3b52m4186286rf24m9f8j98b9lpscpvv |
moresandeep
left a comment
There was a problem hiding this comment.
Awesome, thank you so much! the changes look good.
(cherry picked from commit 67fb077)
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.