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/23 16:44:54 UTC

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

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



##########
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:
       Please, add that the categories can't be 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: github-unsubscribe@beam.apache.org

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