You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/09/13 12:20:47 UTC

[flink] branch release-1.16 updated: [FLINK-29260][release] Wipe exclusion list when updating reference version

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.16
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.16 by this push:
     new ebd8d8e0341 [FLINK-29260][release] Wipe exclusion list when updating reference version
ebd8d8e0341 is described below

commit ebd8d8e0341ccd096d5621f4806a01a94d2b52e7
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Sep 13 14:19:50 2022 +0200

    [FLINK-29260][release] Wipe exclusion list when updating reference version
---
 pom.xml                                         |  2 ++
 tools/releasing/update_japicmp_configuration.sh | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/pom.xml b/pom.xml
index 1e0a18270a4..fde290bb61f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2160,6 +2160,7 @@ under the License.
 								<exclude>@org.apache.flink.annotation.Experimental</exclude>
 								<exclude>@org.apache.flink.annotation.PublicEvolving</exclude>
 								<exclude>@org.apache.flink.annotation.Internal</exclude>
+								<!-- MARKER: start exclusions; these will be wiped by tools/releasing/update_japicmp_configuration.sh -->
 								<exclude>org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator#getSideOutput(org.apache.flink.util.OutputTag)</exclude>
 								<exclude>org.apache.flink.streaming.api.datastream.DataStream#DataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment,org.apache.flink.streaming.api.transformations.StreamTransformation)</exclude>
 								<exclude>org.apache.flink.streaming.api.environment.LegacyLocalStreamEnvironment</exclude>
@@ -2180,6 +2181,7 @@ under the License.
 								<exclude>org.apache.flink.metrics.Histogram#getMetricType()</exclude>
 								<exclude>org.apache.flink.api.connector.source.SplitEnumeratorContext#sendEventToSourceReader(int,int,org.apache.flink.api.connector.source.SourceEvent)</exclude>
 								<exclude>org.apache.flink.api.connector.source.SplitEnumeratorContext#registeredReadersOfAttempts()</exclude>
+								<!-- MARKER: end exclusions -->
 							</excludes>
 							<accessModifier>public</accessModifier>
 							<breakBuildOnModifications>false</breakBuildOnModifications>
diff --git a/tools/releasing/update_japicmp_configuration.sh b/tools/releasing/update_japicmp_configuration.sh
index e8678a7c765..45a4661c994 100755
--- a/tools/releasing/update_japicmp_configuration.sh
+++ b/tools/releasing/update_japicmp_configuration.sh
@@ -59,6 +59,15 @@ function set_japicmp_reference_version() {
   perl -pi -e 's#(<japicmp.referenceVersion>).*(</japicmp.referenceVersion>)#${1}'${version}'${2}#' ${POM}
 }
 
+function clear_exclusions() {
+  exclusion_start=$(($(sed -n '/<!-- MARKER: start exclusions/=' ${POM}) + 1))
+  exclusion_end=$(($(sed -n '/<!-- MARKER: end exclusions/=' ${POM}) - 1))
+
+  if [[ $exclusion_start -lt $exclusion_end ]]; then
+    sed -i "${exclusion_start},${exclusion_end}d" ${POM}
+  fi
+}
+
 current_branch=$(git rev-parse --abbrev-ref HEAD)
 
 if [[ ${current_branch} =~ -rc ]]; then
@@ -73,10 +82,12 @@ if [[ ${current_branch} =~ -rc ]]; then
 elif [[ ${current_branch} =~ ^master$ ]]; then
   # master branch
   set_japicmp_reference_version ${NEW_VERSION}
+  clear_exclusions
 elif [[ ${current_branch} =~ ^release- ]]; then
   # snapshot branch
   set_japicmp_reference_version ${NEW_VERSION}
   enable_public_evolving_compatibility_checks
+  clear_exclusions
 else
   echo "Script was called from unexpected branch ${current_branch}; should be rc/snapshot/master branch."
   exit 1