Hi All,

I'd like to start a discussion of FLIP-401: REST API JSON response
deserialization unknown field tolerance[1].

*Problem statement:*

At the moment Flink is not ignoring unknown fields when parsing REST
responses. An example for such a class is *JobDetailsInfo* but this applies
to all others. It would be good to add this support to increase
compatibility.

The real life use-case is when the Flink k8s operator wants to handle 2
jobs with 2 different Flink versions where the newer version has added a
new field to any REST response. Such case the operator has basically 2
options:
* Use the old Flink version -> Such case exception comes because new field
comes but it's not expected
* Use the new Flink version -> Such case exception comes because new field
is not coming but expected

To hack around this issue it requires quite some ugly code parts in the
operator.

*Proposed solution:*

Ignore all unknown fields in case of REST response JSON deserialization.
Important to know that strict serialization would stay the same as-is.

Actual object mapper configuration which is intended to be changed can be
found here[2].

Please share your opinion on this topic.

BR,
G

[1]
https://cwiki.apache.org/confluence/display/FLINK/FLIP-401%3A+REST+API+JSON+response+deserialization+unknown+field+tolerance
[2]
https://github.com/apache/flink/blob/3060ccd49cc8d19634b431dbf0f09ac875d0d422/flink-runtime/src/main/java/org/apache/flink/runtime/rest/util/RestMapperUtils.java#L31-L38

Reply via email to