tirkarthi commented on code in PR #26750:
URL: https://github.com/apache/airflow/pull/26750#discussion_r989733072
##########
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:
`include_examples` is retrieved by default from configuration in `get_dag`.
Can this change to have it always `False` be removed so that users who don't
want examples to load can do so by using configuration? I was having a test
case in my development PR that worked fine running an example dag and now it
fails after rebase. This will be an issue to users too who might want to
explore tasks command in cli with examples that worked before 2.4.0.
--
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]