You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/01 06:49:24 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #14490: Bugfix: Fix wrong output of tags and owners in dag detail API endpoint

ephraimbuddy commented on a change in pull request #14490:
URL: https://github.com/apache/airflow/pull/14490#discussion_r584478774



##########
File path: tests/api_connexion/schemas/test_dag_schema.py
##########
@@ -122,11 +123,11 @@ def test_serialize(self):
             'is_paused': None,
             'is_subdag': False,
             'orientation': 'LR',
-            'owners': [],
+            'owner': '',
             'params': {'foo': 1},
             'schedule_interval': {'__type': 'TimeDelta', 'days': 1, 'seconds': 0, 'microseconds': 0},
             'start_date': '2020-06-19T00:00:00+00:00',
-            'tags': None,
+            'tags': ["example1", "example2"],

Review comment:
       Previously, the endpoint returns tags object and that made it to output empty objects {} because in the DAG object, tags is a list of strings unlike DagModel where tags is an object.
   
   I think, since this endpoint only outputs data and doesn't add, we will not worry about adding anything else. I have removed the connection between the schema with DagSchema where it inherited DagSchema which defined tags. 
   
   Now the schema is standing alone and not connected with other schemas, and only for the Dagdetails endpoint which only outputs data.
   
   What do you think?
   




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

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