[ 
https://issues.apache.org/jira/browse/BEAM-13362?focusedWorklogId=690770&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690770
 ]

ASF GitHub Bot logged work on BEAM-13362:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Dec/21 04:59
            Start Date: 06/Dec/21 04:59
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #16118:
URL: https://github.com/apache/beam/pull/16118#discussion_r762702697



##########
File path: playground/infrastructure/helper.py
##########
@@ -236,39 +237,52 @@ def _validate(tag: dict, supported_categories: List[str]) 
-> bool:
   """
   valid = True
   for field in fields(TagFields):
-    if tag.get(field.default) is None:
+    if field.default not in tag:
       logging.error(
-        "tag doesn't contain %s field: %s \n"
-        "Please, check that this field exists in the beam playground tag."
-        "If you are sure that this field exists in the tag"
-        " check the format of indenting.", field.default, tag.__str__())
+          "tag doesn't contain %s field: %s \n"
+          "Please, check that this field exists in the beam playground tag."
+          "If you are sure that this field exists in the tag"
+          " check the format of indenting.",
+          field.default,
+          tag.__str__())
+      valid = False
+
+    name = tag.get(TagFields.NAME)
+    if name == "":

Review comment:
       AFAIK tihs is the preferred way to test for empty string / None / etc in 
Python
   
   [1] https://docs.python.org/3/library/stdtypes.html#truth-value-testing
   [2] 
https://stackoverflow.com/questions/9573244/how-to-check-if-the-string-is-empty
   




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 690770)
    Time Spent: 1h  (was: 50m)

> Add pipeline options support for CD
> -----------------------------------
>
>                 Key: BEAM-13362
>                 URL: https://issues.apache.org/jira/browse/BEAM-13362
>             Project: Beam
>          Issue Type: Sub-task
>          Components: beam-playground
>            Reporter: Ilya Kozyrev
>            Assignee: Daria Malkova
>            Priority: P2
>              Labels: beam-playground-devops, beam-playground-sprint-5
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Many examples have pipeline options that are required to run a particular 
> beam pipeline, such as input/output paths and so on.
>  
> Need to add functionality for extraction pipeline options from playground tag 
> and pass them to the RunCode in CI/CD, steps for Beam 
> Examples/Catas/Unit-tests.
>  
> Extracted options need to add to the meta-file for each Beam Playground 
> object  stored in the GCP bucket



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to