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/09/19 16:18:35 UTC

[GitHub] [flink-kubernetes-operator] morhidi opened a new pull request, #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   ## What is the purpose of the change
   The operator cannot be downgraded with new CRD, once the CR containing a new field is written to the last reconciled/stable spec.
   
   ## Brief change log
   The `ObjectMapper` is modified in `ReconciliationUtils`
   ```
   private static final ObjectMapper objectMapper =
               new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
   ```
   
   ## Verifying this change
   
   Added new `ReconciliationUtilsTest.testSpecDeserializationWithUnknownField()`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: no
     - Core observer or reconciler logic that is regularly executed: yes
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no


-- 
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 #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   > @morhidi @gyfora when using `FAIL_ON_UNKNOWN_PROPERTIES=false`, is it necessary to tell the users to make sure that the correct json properties have already verified and guaranteed by Kubernetes itself based on the installed CRD on the document?
   
   Not sure if I understand the question correctly but Kubernetes always validates the json against the CRD and even if the user could submit extra fields they would be ignored and dropped without the user noticing. So I don't think it has any user impact this way.


-- 
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 closed pull request #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

Posted by GitBox <gi...@apache.org>.
morhidi closed pull request #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils
URL: https://github.com/apache/flink-kubernetes-operator/pull/372


-- 
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] SteNicholas commented on pull request #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   @morhidi @gyfora when using `FAIL_ON_UNKNOWN_PROPERTIES=false`, is it necessary to tell the users to make sure that the correct json properties have already verified and guaranteed by Kubernetes itself based on the installed CRD on the document?


-- 
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 #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   > > There are other components that use `ObjectMapper` the `FlinkValidator` for instance should probably also need this config otherwise the webhook might not be compatible
   > 
   > I've been thinking about this and I guess this is the only place we want to deserialize an object with unknown fields, otherwise there's no other way for rolling back to an older operator version. I don't see a reason yet we should allow this in webhook. I'm convincible though :)
   
    1. You deploy a new operator version that has a new flinkSpec field.  
    2. You set that field in a CR
    3. You roll back the operator
    4. Any change to the CR will call the webhook with the CR containing the now unknown field you set in 2.


-- 
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 #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   > There are other components that use `ObjectMapper` the `FlinkValidator` for instance should probably also need this config otherwise the webhook might not be compatible
   
   I've been thinking about this and I guess this is the only place we want to deserialize an object with unknown fields, otherwise there's no other way for rolling back to an older operator version. I don't see a reason yet we should allow this in webhook. I'm convincible though :)


-- 
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 #372: [FLINK-29261] Use FAIL_ON_UNKNOWN_PROPERTIES=false in ReconciliationUtils

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

   There are other components that use `ObjectMapper` the `FlinkValidator` for instance should probably also need this config otherwise the webhook might not be compatible 


-- 
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