AnandInguva commented on code in PR #25739:
URL: https://github.com/apache/beam/pull/25739#discussion_r1128400990


##########
sdks/python/apache_beam/runners/dataflow/internal/apiclient.py:
##########
@@ -506,7 +506,13 @@ def __init__(self, options, proto_pipeline):
     # Labels.
     if self.google_cloud_options.labels:
       self.proto.labels = dataflow.Job.LabelsValue()
-      for label in self.google_cloud_options.labels:
+      labels = self.google_cloud_options.labels
+      if len(labels) == 1:
+        # labels can be passed as cmd args
+        # --labels=name=wrench,age=32,job=dataflow and this is parsed by
+        # argparse as 'labels' : ["name=wrench,age=32,job=dataflow"]
+        labels = labels[0].split(',')

Review Comment:
   sounds good. I will update the PR in some time.



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