nathadfield opened a new issue #12584:
URL: https://github.com/apache/airflow/issues/12584
**Apache Airflow version**: 2.0.0b3
**What happened**:
Running an `airflow tasks test` CLI command produces the following stack
trace even though the task was marked as successful.
```
[2020-11-19 15:32:08,696] {taskinstance.py:1143} INFO - Marking task as
SUCCESS. dag_id=my_dag, task_id=my_task, execution_date=20201118T000000,
start_date=20201119T153140, end_date=20201119T153208
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/airflow/__main__.py", line
40, in main
args.func(args)
File "/usr/local/lib/python3.7/site-packages/airflow/cli/cli_parser.py",
line 50, in command
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line
86, in wrapper
return f(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/airflow/cli/commands/task_command.py",
line 379, in task_test
ti.run(ignore_task_deps=True, ignore_ti_state=True, test_mode=True)
File "/usr/local/lib/python3.7/site-packages/airflow/utils/session.py",
line 63, in wrapper
return func(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line
1350, in run
mark_success=mark_success, test_mode=test_mode, job_id=job_id,
pool=pool, session=session
File "/usr/local/lib/python3.7/site-packages/airflow/utils/session.py",
line 59, in wrapper
return func(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line
1152, in _run_raw_task
self._run_mini_scheduler_on_child_tasks(session)
File "/usr/local/lib/python3.7/site-packages/airflow/utils/session.py",
line 59, in wrapper
return func(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line
1165, in _run_mini_scheduler_on_child_tasks
execution_date=self.execution_date,
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py",
line 3473, in one
raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()
```
**How to reproduce it**:
`airflow tasks test my_dag my_task 2020-11-18`
**How often does this problem occur?**:
Every time.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]