shunping commented on code in PR #40568:
URL: https://github.com/apache/beam/pull/40568#discussion_r4278057420
##########
sdks/python/apache_beam/options/pipeline_options_validator.py:
##########
@@ -168,9 +168,9 @@ def is_service_runner(self):
dataflow_endpoint = (
self.options.view_as(GoogleCloudOptions).dataflow_endpoint)
- if dataflow_endpoint is None:
- return False
- else:
+ # An unset endpoint means the default Dataflow service endpoint (resolved
Review Comment:
I reworded it slightly to make it less distracting, but I'd prefer to keep
it. I think having the context right next to the logic makes it much easier for
future readers to follow.
##########
sdks/python/apache_beam/options/pipeline_options_validator.py:
##########
@@ -274,10 +274,9 @@ def validate_cloud_options(self, view):
else:
view.region = default_region
dataflow_endpoint = view.dataflow_endpoint
- if dataflow_endpoint is None:
- errors.extend(
- self._validate_error(self.ERR_MISSING_OPTION, dataflow_endpoint))
- else:
+ # dataflow_endpoint is optional. When unset, the client library resolves
Review Comment:
Same.
--
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]