gyfora commented on code in PR #620:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/620#discussion_r1231863542


##########
helm/flink-kubernetes-operator/conf/flink-conf.yaml:
##########
@@ -43,6 +43,7 @@ parallelism.default: 1
 # kubernetes.operator.exception.stacktrace.max.length: 2048
 # kubernetes.operator.exception.field.max.length: 2048
 # kubernetes.operator.exception.throwable.list.max.count: 2
+# kubernetes.operator.exception.metadata.mapper: Job has already been 
submitted:duplicatedJobFound,Server returned HTTP response 
code:httpResponseCodeFound

Review Comment:
   Please update this as well after renaming the config key



##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/KubernetesOperatorConfigOptions.java:
##########
@@ -244,6 +245,14 @@ public static String operatorConfigKey(String key) {
                     .withDescription(
                             "Maximum number of throwable to be included in CR 
status error field.");
 
+    @Documentation.Section(SECTION_DYNAMIC)
+    public static final ConfigOption<Map<String, String>> 
OPERATOR_EXCEPTION_LABEL_MAPPER =
+            operatorConfig("exception.metadata.mapper")

Review Comment:
   The config option should also be renamed to `exception.label.mapper` and 
then please regenerate the docs.



##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkResourceExceptionUtils.java:
##########
@@ -29,14 +29,18 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.lang3.exception.ExceptionUtils;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 /** Flink Resource Exception utilities. */
 public final class FlinkResourceExceptionUtils {
 
     private static final ObjectMapper objectMapper = new ObjectMapper();
+    public static final String LABEL_MAPPER_IDENTIFIER = "labels";

Review Comment:
   Could we simply call this constant `LABELS` or `LABELS_KEY?`



##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/KubernetesOperatorConfigOptions.java:
##########
@@ -244,6 +245,14 @@ public static String operatorConfigKey(String key) {
                     .withDescription(
                             "Maximum number of throwable to be included in CR 
status error field.");
 
+    @Documentation.Section(SECTION_DYNAMIC)
+    public static final ConfigOption<Map<String, String>> 
OPERATOR_EXCEPTION_LABEL_MAPPER =
+            operatorConfig("exception.metadata.mapper")
+                    .mapType()
+                    .defaultValue(new HashMap<>())
+                    .withDescription(
+                            "Key-Value pair where key is the REGEX to filter 
through the exception messages and value is the string to be included in CR 
status error metadata field if the REGEX matches. Expected format: 
headerKey1:headerValue1,headerKey2:headerValue2.");

Review Comment:
   Please update the description to refer to label instead of metadata



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