KulykDmytro opened a new issue #18870:
URL: https://github.com/apache/airflow/issues/18870
### Apache Airflow version
2.1.4 (latest released)
### Operating System
Linux 5.4.149-73.259.amzn2.x86_64
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other 3rd-party Helm chart
### Deployment details
Python-3.9
### What happened
define DAG using TaskFlow:
```python
with DAG(
dag_id='dag1',
start_date=datetime(2021, 9, 28),
) as dag:
@task()
def task1():
print('task1')
@task(task_concurrency=1, depends_on_past=True, sla=timedelta(hours=12))
def task2():
return ['id1', 'id2']
@task(multiple_outputs=True)
def task3(transaction_ids: list[str]):
return {
'all_transactions': 2,
'error_transaŃtions': 0,
'error_stats': [{'code': '802', 'message': 'Error1', 'count': 1}]
}
send = task2()
send.set_upstream(task1())
task3(send)
```
When observing scheduled log multiple times:
```
[2021-10-10 10:48:57,473] {baseoperator.py:1295} WARNING - Dependency
<Task(_PythonDecoratedOperator): task2>, task3 already registered for DAG: dag1
[2021-10-10 10:48:57,474] {baseoperator.py:1295} WARNING - Dependency
<Task(_PythonDecoratedOperator): task3>, task2 already registered for DAG: dag1
```
Same warning when trying to serialize DAGBag programmatically
### What you expected to happen
no Warning should appear
### How to reproduce
_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]