[FLINK-39674][formats] Upgrade Confluent Schema Registry client
Summary
This PR updates flink-avro-confluent-registry to a newer Confluent Schema Registry client and adds a focused regression test for Kafka 3.9.x OAuth compatibility.
Root Cause
flink-avro-confluent-registry still used io.confluent:kafka-schema-registry-client:7.5.3. With Kafka client 3.9.x on the classpath, the Schema Registry OAuth bearer path can fail during client initialization because Confluent 7.5.3 calls the old HttpAccessTokenRetriever constructor signature that is no longer present in Kafka 3.9.x.
Changes
- Upgrade
io.confluent:kafka-schema-registry-clientfrom7.5.3to7.9.8. - Add a test-scoped Kafka 3.9.2 dependency for compatibility validation.
- Add a focused regression test that initializes the Schema Registry OAuth bearer credential path with Kafka 3.9.2 on the test classpath.
Validation
- Added RED regression coverage:
./mvnw -pl flink-formats/flink-avro-confluent-registry -Dtest=CachedSchemaCoderProviderTest#testThatOauthBearerAuthIsCompatibleWithKafkaClient39 test -DskipITs -Drat.skip=true -Dcheckstyle.skip=true- Fails before the dependency upgrade with
NoSuchMethodErrorfromOauthCredentialProvider.getTokenRetriever(...).
- Verified GREEN after the upgrade:
./mvnw -pl flink-formats/flink-avro-confluent-registry -Dtest=CachedSchemaCoderProviderTest#testThatOauthBearerAuthIsCompatibleWithKafkaClient39 test -DskipITs -Drat.skip=true -Dcheckstyle.skip=true
- Ran the module test suite:
./mvnw -pl flink-formats/flink-avro-confluent-registry test -DskipITs- Result: 28 tests, 0 failures, 0 errors; checkstyle and spotless clean.
- Verified the final dependency tree includes:
io.confluent:kafka-schema-registry-client:7.9.8org.apache.kafka:kafka-clients:3.9.2in test scope.
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): yes
- The public API, i.e., is any changed class annotated with
@Public(Evolving): no - The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
Was generative AI tooling used to co-author this PR?
- [X] Yes, Hermes Agent with OpenAI GPT-5.5
Generated-by: Hermes Agent (OpenAI GPT-5.5)
CI report:
- 7ab14140868e247a812e4497ac99c220b32b9f33 Azure: FAILURE
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
This PR is focused on formats / Avro Confluent Registry client upgrade. There has already been community review/comment, but it still needs maintainer review.
@MartijnVisser @snuyanzin @pnowojski could you please take a look when you have time and advise whether this approach is acceptable for this area and can move forward?
@qiuyanjun888 The CI has failed for this PR, so even with a review it's not yet mergable. Can you take a look at the failures ?
@MartijnVisser I checked the Azure failures. The blocking issue was the license check for flink-sql-avro-confluent-registry:
com.github.luben:zstd-jni:1.5.6-4was not listedcom.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.21.3was not listed- the old
com.github.luben:zstd-jni:1.5.5-1entry was still listed
Pushed 7ab14140868e247a812e4497ac99c220b32b9f33 to update the SQL module META-INF/NOTICE accordingly.
Local validation:
git diff --check- targeted package build for
flink-formats/flink-sql-avro-confluent-registry - inspected the built JAR
META-INF/NOTICE tools/ci/license_check.shon the targeted validation deployment completed without severe issues
@flinkbot run azure
@flinkbot run azure