Pandry commented on issue #44685:
URL: https://github.com/apache/airflow/issues/44685#issuecomment-2746486219
Hi
I can observe the same behavior, and I'd like to drop the request body of
the second call,
`/api/v1/dags/<dag_id>/dagRuns/<run_id>/taskInstances/<task_id>/dependencies`,
which is a bit different:
```
{
"detail": null,
"status": 404,
"title": "Task Instance not found for dag_id=<dag_id>,
run_id=scheduled__2025-03-23T21:00:00+00:00, task_id=<task_id>",
"type":
"https://airflow.apache.org/docs/apache-airflow/2.10.0/stable-rest-api-ref.html#section/Errors/NotFound"
}
```
In my case the behavior is not consistent (so I'm starting to suspect an
error on the database side, perhaps too slow) and it tends to happen on
failures (but perhaps that's a bias of mine, as I tend to open errored tasks)
I'm also trying to reproduce it (locally, with `airflow standalone`),
without much success (perhaps SQLite is too fast?)
<details><summary>Code that does not reproduce the error</summary>
```python
import random, pendulum
from airflow.decorators import task, task_group, dag
@task(retries=0)
def may_fail(perc=0.1):
r = random.uniform(0, 1)
if r <= perc:
raise RuntimeError("foo")
return
@task
def echo():
return "Hi!"
@dag(schedule_interval='*/1 * * * *', start_date=pendulum.datetime(2021, 1,
1, tz="UTC"), catchup=False)
def error_test():
@task_group
def fail(foo):
may_fail()
a = may_fail(.2)
b = may_fail(foo)
a >> b
f = fail.expand(foo=[i/10 for i in range (1,7)])
echo() >> f >> echo()
error_test()
```
</details>
--
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]