goutamadwant opened a new pull request, #12402: URL: https://github.com/apache/seatunnel/pull/12402
### Purpose of this pull request Closes #12401. Correct named-user authentication in the shared Redis Connector-V2 source/sink connection helper. In SINGLE mode, the helper previously used password-only AUTH followed by ACL SETUSER. That command changes ACL configuration rather than authenticating the connection. CLUSTER mode also omitted the configured username. Use named-user AUTH in both modes, preserve legacy default-user authentication and close connections when authentication, database selection or client initialization fails. ### Does this PR introduce _any_ user-facing change? Yes. A nonblank `user` now selects the intended Redis ACL identity instead of failing with valid named credentials or continuing as the default user. Connection setup no longer creates or modifies ACL users. Configurations without a username retain their existing no-auth/password-only behavior. Named-user passwords are passed unchanged; omitted or empty passwords are sent as an empty string and require an ACL user that accepts them. Compatibility: configurations that relied on an ignored username must supply valid credentials and permissions for that user, or remove `user` to retain default-user authentication. Named users require Redis 6 or later. EN/ZH connector and incompatible-change documentation include migration guidance. No option rename or new dependency is introduced. ### How was this patch tested? - Before the fix, real-server regressions reproduce the wrong SINGLE-mode identity and failed CLUSTER-mode authentication with valid named credentials. - Java 8 and Java 11: 67 Redis tests pass on each JDK with zero failures/errors/skips, including Redis 5 legacy behavior and Redis 7 named-user cases. - Coverage includes identical named/default passwords, restricted keys and commands, database selection, absent/empty/whitespace credentials, unchanged ACLs and server-side connection counts after failures. - The cluster fixture is a real single-node cluster owning all slots. Multi-node redirection/failover and TLS are not covered. - A fresh 70-module E2E reactor passes with Java 11 as the host JDK. The named-user source-to-sink test passes all seven engine invocations: Flink 1.13.6/1.15.3/1.18.0/1.20.1, Spark 2.4.6/3.3.0 and Zeta. It verifies the output and unchanged ACL inventory against Redis 7.4.11. Engine containers use their own bundled JVMs. - Spotless and whitespace checks pass. Whole-repository `./mvnw -q -DskipTests verify` passes on Java 11, including distribution packaging. This compiles the broader tests but does not execute them. Run the regression suite with `./mvnw -pl seatunnel-connectors-v2/connector-redis -am -Dtest=RedisFactoryTest,Redis7Test,Redis5Test,RedisSinkTest,RedisSinkWriterTest,RedisTableConfigTest -Dsurefire.failIfNoSpecifiedTests=false verify`. Run job integration coverage with `./mvnw -Pci -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-redis-e2e -am -DskipUT -DskipIT=false -Dit.test=Redis7IT#testNamedUserSourceAndSink -DfailIfNoTests=false verify`. ### Check list - [x] EN/ZH source and sink documentation updated. - [x] EN/ZH incompatible-change guidance added. - [x] Existing connector E2E coverage extended for separate named source/sink users. - [x] No new dependency, binary package or connector registration change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
