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 2022/08/25 07:44:55 UTC

[GitHub] [airflow] clellmann commented on a diff in pull request #25900: Add conf parameter to CLI for airflow dags test

clellmann commented on code in PR #25900:
URL: https://github.com/apache/airflow/pull/25900#discussion_r954612326


##########
airflow/cli/commands/dag_command.py:
##########
@@ -451,13 +451,18 @@ def dag_list_dag_runs(args, dag=None, session=NEW_SESSION):
 @cli_utils.action_cli
 def dag_test(args, session=None):
     """Execute one single DagRun for a given DAG and execution date, using the DebugExecutor."""
+    run_conf = None
+    if args.conf:
+        run_conf = json.loads(args.conf)

Review Comment:
   Actually, I would say it makes sense to break the command when a wrong input is given so that the user is informed. Also it doesn't make sense to execute the command otherwise with a wrong input since this won't give the result the user expects, I think.
   This implementation is also used already in the dag_backfill command in line 82.



-- 
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: commits-unsubscribe@airflow.apache.org

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