Thanks Piotr for the kindly reply, what confused me is that `SourceReaderContext` was marked @Public when it was born in flink 1.11, and then it was corrected to @PublicEvolving in 1.11 -_-, and finally it was changed to @Public again...
As Flink and Flink ecosystem(Flink CDC connectors) developer, I think what we're discussing is meaningful and I’d like to help improve those Public API check for those changes. Chesnay’s tips is a good idea that maybe we can use the tool like japicmp to do the check for every PR in CI phase. Best, Leonard > 在 2021年9月28日,21:15,Piotr Nowojski <pnowoj...@apache.org> 写道: > > Hi Leonard, > > Sorry for this causing you troubles, however that change in the return type > was done while this class still has been marked as `@PublicEvolving`[1]. As > of 1.13.x `SourceReaderContext` was `@PublicEvolving` and it was marked as > `@Public` only starting from Flink 1.14.0 [2]. Probably what confused you > was that both of those changes (changing the return type and making it > `@Public`) happened in the same release. > > However, those changes (`SourceReaderContext` and `ResolvedCatalogTable`) > should have been clearly mentioned in the release notes with an upgrade > guide. > > Best, Piotrek > > [1] > https://github.com/apache/flink/commit/7f3636f6b4f8bac415a7db85917ad849636bd730#diff-a247a24ccd1afc07c5d690a8a58b1f6584329925fdf0d7dc89361b90d621b7f2R31 > [2] https://issues.apache.org/jira/browse/FLINK-22357 > > wt., 28 wrz 2021 o 14:49 Leonard Xu <xbjt...@gmail.com> napisał(a): > >>>> >>>> Not sure if this will happen in 1.15 already. We will needed automated >>>> compatibility tests and a well-defined list of stable API. >> >>> We are >>> trying to provide forward compatibility: applications using `@Public` >> APIs >>> compiled against Flink 1.12.x, should work fine in Flink 1.13.x >> >> Unfortunately, I also meet forward compatibility issue, when I do the >> release 1.14 check, I try to use mysql-cdc connector[1] which compiled >> against 1.13.1in SQL Client, but it can not work in flink 1.14.0 cluster, >> it failed due to the metric API compatibility broken. >> >> @Public >> public interface SourceReaderContext { >> >> MetricGroup metricGroup(); >> >> >> @Public >> public interface SourceReaderContext { >> >> SourceReaderMetricGroup metricGroup(); >> >> >> Shouldn't we mark it as @Deprecated and then delete it util 2.0.0 version >> for @Public API as the our community rule [2] described? At least we should >> keep them across server minor versions (<major>.<minor>.<patch>). >> >> Although these changes can be tracked to voted FLIPs and it’s not the >> fault of a few developers, it show us the fact that we didn’t pay enough >> attention to back compatibility/forward compatibility. >> >> Best, >> Leonard >> [1] >> https://github.com/ververica/flink-cdc-connectors/tree/master/flink-connector-mysql-cdc >> [2] >> https://cwiki.apache.org/confluence/display/FLINK/Stability+Annotations >> >>