dstandish commented on code in PR #37826:
URL: https://github.com/apache/airflow/pull/37826#discussion_r1509633634
##########
airflow/api_connexion/endpoints/dag_endpoint.py:
##########
@@ -81,11 +81,13 @@ def get_dag_details(
for key, value in dag.__dict__.items():
if not key.startswith("_") and not hasattr(dag_model, key):
setattr(dag_model, key, value)
+
try:
dag_detail_schema = DAGDetailSchema(only=fields) if fields else
DAGDetailSchema()
except ValueError as e:
raise BadRequest("DAGDetailSchema init error", detail=str(e))
- return dag_detail_schema.dump(dag_model)
+ serialized_dag_model = dag_detail_schema.dump(dag_model)
+ return serialized_dag_model
Review Comment:
```suggestion
return dag_detail_schema.dump(dag_model)
```
serialized_dag_model means something specific, namely `SerializedDagModel`
which is not this
so let's avoid confusion
##########
tests/api_connexion/endpoints/test_dag_endpoint.py:
##########
@@ -310,6 +310,7 @@ def test_should_respond_200(self, url_safe_serializer):
"concurrency": 16,
"dag_id": "test_dag",
"dag_run_timeout": None,
+ "dataset_expression": {},
Review Comment:
`None` is probably a better default. Would you agree @uranusjr ?
--
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]