MartijnVisser opened a new pull request, #335:
URL: https://github.com/apache/flink-connector-kafka/pull/335
## What is the purpose of the change
This pull request makes `main` build and test against Flink 2.3 next to 2.2,
so that the next release can support both. `flink.version` stays at 2.2.1, the
lowest supported version. Only tests needed changes. On 2.3.0, `main` fails to
compile `KafkaSinkITCase`, and 26 table tests fail once it compiles.
This picks up #284, which moved the build to 2.3.0 only.
## Brief change log
- `KafkaSinkITCase` uses `JobResult.isSuccess()`, since
`getApplicationStatus()` was removed in 2.3
- Since FLIP-558, Flink 2.3 rejects an insert whose upsert key differs
from the primary key of the sink unless it has an `ON CONFLICT` clause, which
2.2 does not parse. `KafkaTableTestBase` adds `ON CONFLICT DO DEDUPLICATE` on
2.3 and later, which keeps the previous behaviour. It is used by
`UpsertKafkaTableITCase` and `KafkaChangelogTableITCase`. Two Table API inserts
became SQL, because `InsertConflictStrategy` does not exist in 2.2.
- `KafkaTableITCase` casts `TIME(3)` to `TIME(0)` before casting it to a
string, because 2.3 renders the precision of `TIME` (FLINK-17224)
- PR CI runs against 2.2.1 and 2.3.0, the weekly build also runs `main`
against 2.3-SNAPSHOT
## Verifying this change
This change is already covered by existing tests, the four adapted ITCases.
- Red: `main` (8ddcc090) against 2.3.0 fails to compile `KafkaSinkITCase`.
With only that fixed, 26 of 723 tests fail, in `UpsertKafkaTableITCase`,
`KafkaChangelogTableITCase` and `KafkaTableITCase`.
- Green: `./mvnw clean verify` passes against 2.2.1 and 2.3.0 on JDK 17,
723 tests each, as does the dependency convergence check. The first 2.2.1 run
had one failure in `KafkaWriterITCase.testCurrentSendTimeMetric`, which this PR
does not touch. It passed 20 of 20 isolated runs on this branch and on `main`,
and the full 2.2.1 rerun was green.
- The PyFlink job does not test 2.3 yet, because `tox.ini` installs
`apache-flink` from PyPI without a version. That was already the case before
this PR.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency, including
`kafka.version` or `flink.version`): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)` or `@Experimental`, or are the Table options or the PyFlink
wrappers changed: no
- Checkpointed state, its serializers, or exactly-once delivery (splits,
enumerator state, writer state, committables, transactions): no
- The per-record code paths (split reader, record emitter, writer,
serialization schemas; performance sensitive): no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
- If the docs changed, are both `docs/content` and `docs/content.zh`
updated? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Opus 5.5)
--
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]