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


##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -368,6 +368,14 @@ def 
_check_for_unsupported_features_on_non_portable_worker(self, pipeline):
 
   def run_pipeline(self, pipeline, options, pipeline_proto=None):
     """Remotely executes entire pipeline or parts reachable from node."""
+    if _is_runner_v2_disabled(options):
+      debug_options = options.view_as(DebugOptions)
+      if not debug_options.lookup_experiment('disable_runner_v2_until_v2.50'):
+        raise ValueError(
+            'disable_runner_v2 is deprecated in Beam Python ' +
+            beam.version.__version__ + '. ' +
+            'If needed, please use disable_runner_v2_until_v2.50.')

Review Comment:
   disable_runner_v2_until_2023
   ```suggestion
           raise ValueError(
               'disable_runner_v2 is deprecated in Beam Python ' +
               beam.version.__version__ +
               ' and this execution mode will be removed in a future Beam SDK. '
               'If needed, please use: '
               '"--experiments=disable_runner_v2_until_v2.50".')
   ```



##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -368,6 +368,14 @@ def 
_check_for_unsupported_features_on_non_portable_worker(self, pipeline):
 
   def run_pipeline(self, pipeline, options, pipeline_proto=None):
     """Remotely executes entire pipeline or parts reachable from node."""
+    if _is_runner_v2_disabled(options):
+      debug_options = options.view_as(DebugOptions)
+      if not debug_options.lookup_experiment('disable_runner_v2_until_v2.50'):
+        raise ValueError(
+            'disable_runner_v2 is deprecated in Beam Python ' +
+            beam.version.__version__ + '. ' +
+            'If needed, please use disable_runner_v2_until_v2.50.')

Review Comment:
   ```suggestion
           raise ValueError(
               'disable_runner_v2 is deprecated in Beam Python ' +
               beam.version.__version__ +
               ' and this execution mode will be removed in a future Beam SDK. '
               'If needed, please use: '
               '"--experiments=disable_runner_v2_until_v2.50".')
   ```



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