You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/02/24 17:48:43 UTC

[GitHub] [beam] tvalentyn commented on a change in pull request #14070: Log a warning when Dataflow returns an unrecognized state

tvalentyn commented on a change in pull request #14070:
URL: https://github.com/apache/beam/pull/14070#discussion_r582171202



##########
File path: runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/MonitoringUtil.java
##########
@@ -219,6 +220,11 @@ public static String getGcloudCancelCommand(DataflowPipelineOptions options, Str
   }
 
   public static State toState(String stateName) {
-    return MoreObjects.firstNonNull(DATAFLOW_STATE_TO_JOB_STATE.get(stateName), State.UNRECOGNIZED);
+    @Nullable State recognizedState = DATAFLOW_STATE_TO_JOB_STATE.get(stateName);
+    if (recognizedState != null) {
+      return recognizedState;
+    }
+    LOG.warn("Unrecognized state from Dataflow service: {}", stateName);

Review comment:
       Should we add a note: "Consider upgrading to a newer version of Beam" and/or an explanation: "This likely means that you are using an old version of Beam SDK". ?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org