You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/29 17:48:01 UTC

[GitHub] [flink-kubernetes-operator] gyfora opened a new pull request, #285: [FLINK-26955] Add CRD compatibility check to maven build

gyfora opened a new pull request, #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285

   Add automated CRD compatibility check logic to the maven build comparing against the 1.0.0 release.
   
   Manually verified + unit tests added for the cases covered by the checker


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] morhidi commented on pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
morhidi commented on PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#issuecomment-1171970081

   Thanks @gyfora for the PR. Having such a tool overall is a great idea, it'll force us to think twice before introducing any changes to the CRD. I second @tweise's suggestion to agree formally on a few bullets that we add to the CRD checker, e.g.: https://www.faun.dev/c/stories/dineshparvathaneni/kubernetes-crd-versioning-for-operator-developers/ 


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora commented on pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
gyfora commented on PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#issuecomment-1171616488

   cc @bgeng777 @morhidi 


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
gyfora commented on code in PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#discussion_r911686383


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/validation/CrdCompatibilityChecker.java:
##########
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.validation;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/** Utility for checking backward CRD compatibility. */

Review Comment:
   Done



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora merged pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
gyfora merged PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] gyfora commented on pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
gyfora commented on PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#issuecomment-1172027155

   @morhidi I added the requested javadoc with the checks listed, PTAL


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] morhidi commented on pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
morhidi commented on PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#issuecomment-1172055144

   +1 LGTM, as we understand more about CRD version compatibility we should add/modify the rules here. Nice job!


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-kubernetes-operator] tweise commented on a diff in pull request #285: [FLINK-26955] Add CRD compatibility check to maven build

Posted by GitBox <gi...@apache.org>.
tweise commented on code in PR #285:
URL: https://github.com/apache/flink-kubernetes-operator/pull/285#discussion_r911423307


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/validation/CrdCompatibilityChecker.java:
##########
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.validation;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/** Utility for checking backward CRD compatibility. */

Review Comment:
   Maybe add a summary here on how compatibility is checked?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org