SamWheating commented on code in PR #30113:
URL: https://github.com/apache/airflow/pull/30113#discussion_r1136506470
##########
airflow/api_connexion/endpoints/dag_run_endpoint.py:
##########
@@ -338,7 +338,7 @@ def post_dag_run(*, dag_id: str, session: Session =
NEW_SESSION) -> APIResponse:
run_id=run_id,
execution_date=logical_date,
data_interval=dag.timetable.infer_manual_data_interval(run_after=logical_date),
- state=DagRunState.QUEUED,
+ state=post_body.get("state"),
Review Comment:
I think that the schema validation will already populate the `state` field
in the body with the default value from the openAPI schema if its undefined. Do
you think its necessary to define the default twice for clarity?
--
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]