You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/24 08:29:41 UTC

[GitHub] [beam] AydarZaynutdinov commented on a change in pull request #16344: [BEAM-13536][Playground][Bugfix] CI step doesn't log case with empty category value

AydarZaynutdinov commented on a change in pull request #16344:
URL: https://github.com/apache/beam/pull/16344#discussion_r774928476



##########
File path: playground/infrastructure/helper.py
##########
@@ -284,25 +284,24 @@ def _validate(tag: dict, supported_categories: List[str]) -> bool:
     valid = False
 
   categories = tag.get(TagFields.categories)
-  if categories is not None:
-    if not isinstance(categories, list):
-      logging.error(
-          "tag's field categories is incorrect: %s \n"
-          "categories variable should be list format, but tag contains: %s",
-          tag.__str__(),
-          str(type(categories)))
-      valid = False
-    else:
-      for category in categories:
-        if category not in supported_categories:
-          logging.error(
-              "tag contains unsupported category: %s \n"
-              "If you are sure that %s category should be placed in "
-              "Beam Playground, you can add it to the "
-              "`playground/categories.yaml` file",
-              category,
-              category)
-          valid = False
+  if not isinstance(categories, list):
+    logging.error(
+        "tag's field categories is incorrect: %s \n"
+        "categories variable should be list format, but tag contains: %s",

Review comment:
       Above this part this method contains the code where we check all fields and their values:
   ```
   value = tag.get(field.default)
       if value == "" or value is None:
         logging.error(
             "tag's value is incorrect: %s\nvalue for %s field can not be empty.",
             tag.__str__(),
             field.default.__str__())
         valid = False
   ```
   So if categories value is empty this part should catch it.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org