jyotsa09 opened a new issue, #27879:
URL: https://github.com/apache/airflow/issues/27879
### Apache Airflow version
main (development)
### What happened
Getting error in scheduler logs "Task killed externally" when running a dag
with task group mapping
Logs -
```
scheduler | [2022-11-24 11:30:05,683] {local_executor.py:130} ERROR - Failed
to execute task map_index passed to non-mapped task.
scheduler | Traceback (most recent call last):
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/executors/local_executor.py",
line 126, in _execute_work_in_fork
scheduler | args.func(args)
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/cli/cli_parser.py", line 52,
in command
scheduler | return func(*args, **kwargs)
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/utils/cli.py", line 108, in
wrapper
scheduler | return f(*args, **kwargs)
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/cli/commands/task_command.py",
line 376, in task_run
scheduler | ti, _ = _get_ti(task, args.map_index,
exec_date_or_run_id=args.execution_date_or_run_id, pool=args.pool)
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/utils/session.py", line 75,
in wrapper
scheduler | return func(*args, session=session, **kwargs)
scheduler | File
"/Users/jyotsananamdev/dev-airflow/airflow/airflow/cli/commands/task_command.py",
line 156, in _get_ti
scheduler | raise RuntimeError("map_index passed to non-mapped task")
scheduler | RuntimeError: map_index passed to non-mapped task
```
other logs-
```
scheduler | [2022-11-24 11:30:06,614] {scheduler_job.py:681} ERROR -
Executor reports task instance <TaskInstance: taskmap_taskgroup.tg.hello_there
manual__2022-11-24T05:59:58.057750+00:00 map_index=0 [queued]> finished
(failed) although the task says its queued. (Info: None) Was the task killed
externally?
scheduler | [2022-11-24 11:30:06,615] {taskinstance.py:1751} ERROR -
Executor reports task instance <TaskInstance: taskmap_taskgroup.tg.hello_there
manual__2022-11-24T05:59:58.057750+00:00 map_index=0 [queued]> finished
(failed) although the task says its queued. (Info: None) Was the task killed
externally?
```
### What you think should happen instead
It should pass
### How to reproduce
Run the below dag to reproduce this -
```
from datetime import datetime
from airflow import DAG
from airflow.decorators import task, task_group
from airflow.operators.empty import EmptyOperator
with DAG(
dag_id="taskmap_taskgroup",
tags=["AIP_42"],
start_date=datetime(1970, 1, 1),
schedule=None,
) as dag:
@task
def hello_there(arg):
print(arg)
@task_group
def tg(x):
hello_there(x)
tg.expand(x=[1]) >> EmptyOperator(task_id="done")
```
### Operating System
mac os
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]