tirkarthi commented on code in PR #26750:
URL: https://github.com/apache/airflow/pull/26750#discussion_r996901947


##########
airflow/cli/commands/task_command.py:
##########
@@ -364,14 +363,7 @@ def task_run(args, dag=None):
         print(f'Loading pickle id: {args.pickle}')
         dag = get_dag_by_pickle(args.pickle)
     elif not dag:
-        if args.local:
-            try:
-                dag = get_dag_by_deserialization(args.dag_id)
-            except AirflowException:
-                print(f'DAG {args.dag_id} does not exist in the database, 
trying to parse the dag_file')
-                dag = get_dag(args.subdir, args.dag_id)
-        else:
-            dag = get_dag(args.subdir, args.dag_id)
+        dag = get_dag(args.subdir, args.dag_id, include_examples=False)

Review Comment:
   I was trying out a patch for this issue : 
https://github.com/apache/airflow/issues/26555 . I just added an example of 
dynamic task mapping dag in this PR as a fixture : 
https://github.com/apache/airflow/pull/26678 . I used to use this dag in my 
test case calling `airflow tasks render` which used to pass earlier but failed 
after rebase. I don't have the PR created yet.



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

Reply via email to