Param does not work with type=['array', 'null'], items={'type': 'number'} and None default #45032
Open
1 of 2 tasks
Labels
area:core
area:UI
Related to UI/UX. For Frontend Developers.
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.8.2
What happened?
I am trying to pass a parameter to a DAG using
Param
. I need to pass an optional list of integers, hence, I tried usingtype=['array', 'null'], items={'type': 'number'}
with None as default value. However, when I try to trigger the DAG and add a non-None array of numbers, the JSON config does not get updated andnull
is passed.What you think should happen instead?
The non-empty array of integers should get passed to the DAG.
How to reproduce
Create a DAG with the mentioned Param, e.g.
Now try to trigger it with config and add a list of integer IDs. I noted, that it works when I specify
type='array'
but the default should beNone
. The behaviour of my DAG differs whenids
areNone
or an empty list, so passing[]
as a default and removingnull
is not an option.Operating System
Debian bookworm
Versions of Apache Airflow Providers
apache-airflow-providers-amazon==8.18.0
apache-airflow-providers-celery==3.6.0
apache-airflow-providers-common-io==1.3.0
apache-airflow-providers-common-sql==1.11.0
apache-airflow-providers-docker==3.9.1
apache-airflow-providers-ftp==3.7.0
apache-airflow-providers-http==4.9.1
apache-airflow-providers-imap==3.5.0
apache-airflow-providers-postgres==5.10.1
apache-airflow-providers-redis==3.6.0
apache-airflow-providers-sqlite==3.7.1
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else?
Always when trying to use Param with the mentioned combination.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: