tvalentyn commented on code in PR #38252:
URL: https://github.com/apache/beam/pull/38252#discussion_r3407408222


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java:
##########
@@ -1550,12 +1530,8 @@ public DataflowPipelineJob run(Pipeline pipeline) {
     // enable upload_graph when the graph is too large
     byte[] jobGraphBytes = 
DataflowPipelineTranslator.jobToString(newJob).getBytes(UTF_8);
     int jobGraphByteSize = jobGraphBytes.length;
-    if (jobGraphByteSize >= CREATE_JOB_REQUEST_LIMIT_BYTES
-        && !hasExperiment(options, "upload_graph")
-        && !useUnifiedWorker(options)) {
-      List<String> experiments = firstNonNull(options.getExperiments(), 
Collections.emptyList());
-      options.setExperiments(
-          
ImmutableList.<String>builder().addAll(experiments).add("upload_graph").build());
+    if (jobGraphByteSize >= CREATE_JOB_REQUEST_LIMIT_BYTES && 
!useUnifiedWorker(options)) {
+      ExperimentalOptions.addExperiment(options, "upload_graph");
       LOG.info(

Review Comment:
   nit: looks like this log line will now be printed regardless even if the 
experiment was already enabled.
   let's add         `&& !hasExperiment(options, "upload_graph")` back?



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