riteshghorse commented on code in PR #26220:
URL: https://github.com/apache/beam/pull/26220#discussion_r1166996877
##########
sdks/python/apache_beam/runners/worker/sdk_worker_main.py:
##########
@@ -175,20 +175,32 @@ def create_harness(environment, dry_run=False):
def main(unused_argv):
"""Main entry point for SDK Fn Harness."""
- fn_log_handler, sdk_harness, sdk_pipeline_options =
create_harness(os.environ)
- experiments = sdk_pipeline_options.view_as(DebugOptions).experiments or []
+ (fn_log_handler, sdk_harness,
+ sdk_pipeline_options) = create_harness(os.environ)
dataflow_service_options = (
sdk_pipeline_options.view_as(GoogleCloudOptions).dataflow_service_options
or [])
- if (_ENABLE_GOOGLE_CLOUD_PROFILER in experiments) or (
- _ENABLE_GOOGLE_CLOUD_PROFILER in dataflow_service_options):
+ experiments = (sdk_pipeline_options.view_as(DebugOptions).experiments or [])
+ exp = None
+ if ((_ENABLE_GOOGLE_CLOUD_PROFILER in experiments) or
+ (_ENABLE_GOOGLE_CLOUD_PROFILER in dataflow_service_options)):
+ exp = True
+ for experiment in experiments:
+ if experiment.startswith(_ENABLE_GOOGLE_CLOUD_PROFILER + '='):
+ exp = experiment.split('=', 1)[1]
+
+ if exp:
+ if not isinstance(exp, bool):
Review Comment:
done
--
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]