mateczagany commented on code in PR #1195:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1195#discussion_r3871333337


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/state/KubernetesAutoScalerStateStore.java:
##########
@@ -307,7 +307,7 @@ private static SortedMap<Instant, CollectedMetrics> 
deserializeEvaluatedMetrics(
     }
 
     private static String serializeParallelismOverrides(Map<String, String> 
overrides) {
-        return ConfigurationUtils.convertValue(overrides, String.class);
+        return ConfigurationUtils.convertValue(overrides, String.class, false);
     }
 
     private static Map<String, String> deserializeParallelismOverrides(String 
overrides) {

Review Comment:
   If the operator is configured with a legacy `flink-conf.yaml`, state written 
by older operator versions in standard YAML form would fail to parse as 
`standardYaml` would be set to false in `GlobalConfiguration`.
   
   By setting `standardYaml` to true for `convertValue` calls inside the 
deserialization, it would be able to parse standard YAML, and fallback to the 
legacy parser if that fails.
   
   Quite the edge case, as one would need to revert from a standard YAML config 
to a legacy one, but I think the fix is quite simple.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to