Incorrect field rendering in DAG Params
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Apache Airflow version
2.10.4
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
I was using 2.7.1 before and didn't have this problem but after upgrading to 2.10.4 I am facing this problem in my existing DAG.
I'm adding parameters to the DAG using Params. When I create a field with the **array** type and specify the element type **number**, the field is rendered as a list on the UI.
But when I create the same field with the **array** type but specify the element type **string**, the list is not rendered on the UI and each element must be passed on a new line. I think this is not very convenient and not intuitive.
### What you think should happen instead?
I think it would be more convenient if the data type did not affect the way the field is rendered on the UI, and if the array type is specified, then it would be displayed on the UI as a familiar list.
### How to reproduce
Code for array with numbers:
`params={
"sf_additional_schemas": Param(
title="Additional Snowflake schemas",
default=[1, 2, 3],
type="array",
items={
"type": "number"
}
),`
Code for array with strings:
`params={
"sf_additional_schemas": Param(
title="Additional Snowflake schemas",
default=["schema1"],
type="array",
items={
"type": "string"
}
),`
### Operating System
MacOS 15.0
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### 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)
Contributor guide
Research direction
Reproduce the issue in Airflow 2.10.4 using the two Param definitions shown in the report, then trace the DAG Params UI rendering path. Confirm how array element types affect the displayed control and add regression coverage if the relevant test location is identified. Done means string and number arrays render consistently as an appropriate list control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100