You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Airflow crashes when DAG run triggered by POST request with oversized conf #14159
I recently discovered the upper limits of the Airflow experimental API when passing a conf that was too long (~100KB, very long text). I think there should be some error handling to detect when the conf in a POST request via the API is truncated.
I didn't save the error message but it was something from SqlAlchemy trying to write a truncated JSON so the parsing didn't work properly
What you expected to happen:
There should be some sort of failsafe to detect malformed requests and soft-fail somehow.
How to reproduce it:
Send a POST request as seen below where the JSON after --data is larger than 64KB.
Anything else we need to know:
This bug will break the DAG listing (localhost:1188/admin) as well as the UI for the offending DAG (localhost:1188/admin/airflow/tree?dag_id=<my_broken_dag>)
Are you on MySQL? I suspect what has happened is mysql, in its infinite wisdom, has silently trucated the JSON blob, so now the value in the DB is not valid JSON, but the post data was.
Are you on MySQL? I suspect what has happened is mysql, in its infinite wisdom, has silently trucated the JSON blob, so now the value in the DB is not valid JSON, but the post data was.
exactly this. 200 response, DAG run created but sql errors due to truncation.
Activity
boring-cyborg commentedon Feb 9, 2021
Thanks for opening your first issue here! Be sure to follow the issue template!
ashb commentedon Feb 10, 2021
The post request gave a 200 I assume?
Are you on MySQL? I suspect what has happened is mysql, in its infinite wisdom, has silently trucated the JSON blob, so now the value in the DB is not valid JSON, but the post data was.
THEdavehogue commentedon Feb 10, 2021
exactly this. 200 response, DAG run created but sql errors due to truncation.
codersky commentedon Mar 28, 2021
as a workaround, we change the conf column from tiny blob to medium in mysql
eladkal commentedon Oct 8, 2021
This issue is reported against old airflow version. The experimental API is deprecated in favor of a rest API.
Please upgrade your Airflow version and change to the rest API:
https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html