[
https://issues.apache.org/jira/browse/BEAM-13536?focusedWorklogId=700920&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-700920
]
ASF GitHub Bot logged work on BEAM-13536:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Dec/21 08:29
Start Date: 24/Dec/21 08:29
Worklog Time Spent: 10m
Work Description: 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 700920)
Time Spent: 40m (was: 0.5h)
> [Playground] CI step doesn't log case with empty category value
> ---------------------------------------------------------------
>
> Key: BEAM-13536
> URL: https://issues.apache.org/jira/browse/BEAM-13536
> Project: Beam
> Issue Type: Bug
> Components: beam-playground
> Reporter: Aydar Zaynutdinov
> Assignee: Aydar Zaynutdinov
> Priority: P3
> Labels: beam-playground-backend
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Now in the case of some example has Been tag with an empty category value the
> CI step passes this one.
> Need to add a log for this case and to fail the CI step.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)