Daren Wong created FLINK-32317: ---------------------------------- Summary: Enrich metadata in CR error field Key: FLINK-32317 URL: https://issues.apache.org/jira/browse/FLINK-32317 Project: Flink Issue Type: Improvement Components: Kubernetes Operator Affects Versions: kubernetes-operator-1.5.0 Reporter: Daren Wong Fix For: kubernetes-operator-1.6.0
CR Error field is improved in https://issues.apache.org/jira/browse/FLINK-29708. The error field is more structured with exception type, stackTrace, additionalMetadata, etc. This ticket is a proposal to expose a config ("kubernetes.operator.exception.metadata.mapper") to enrich the additionalMetadata further. The config consists of key-value pairs, for example: {code:java} kubernetes.operator.exception.metadata.mapper: IOException:Found IOException,403:Found 403 error code{code} The key is a REGEX string that will be used to match against the whole stack trace and if found, the value will be added to additionalMetadata. For example: {code:java} apiVersion: flink.apache.org/v1beta1 kind: FlinkSessionJob .... name: basic-session-job-example namespace: default resourceVersion: "70206149" uid: 916ea8f5-0821-4839-9953-2db9678c3fc9 spec: deploymentName: basic-session-deployment-example job: args: [] jarURI: https://test-s3.s3.amazonaws.com/doubleExecute.jar parallelism: 4 state: running upgradeMode: stateless status: error: '{"type":"org.apache.flink.kubernetes.operator.exception.ReconciliationException","message":"java.io.IOException: Server returned HTTP response code: 403 for URL: https://test-s3.s3.amazonaws.com/doubleExecute.jar","additionalMetadata":{"exceptionMapper":["Found 403 error code","Found IOException"]},"throwableList":[{"type":"java.io.IOException","message":"Server returned HTTP response code: 403 for URL: https://test-s3.s3.amazonaws.com/doubleExecute.jar","additionalMetadata":{"exceptionMapper":["Found 403 error code"]}}]}' ... {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)