apache / apache/airflow

DAGs with required object type param cannot be triggered with default None

Open
#55,213 4 comments 0 reactions 0 assignees View on GitHub
_eol_affected_version:2.10 area:core area:UI kind:bug
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Apache Airflow version

2.11.0

### If "Other Airflow 2 version" selected, which one?

_No response_

### What happened?

If a DAG contains "object" Param having not having default set, then the manual triggering for it doesn't succeed. In this case, If I push "Trigger" button in UI, it just doesn't react (of course this field is filled manually).
I noticed that the reason is because the text that I write is not copied into hidden , and therefore validation error arise, but as this field is hidden, there is no information for user, and its clearly a bug.

Image

### What you think should happen instead?

There is clearly an error in console probably connected to this issue.

### How to reproduce

`from airflow import DAG
from airflow.operators.dummy import DummyOperator
from airflow.models import Param

with DAG(
"run-test",
params={
"object_param": Param( type="object", description="Object field"),
},
schedule=None,
catchup=False,
) as dag:
DummyOperator(task_id="dummy_task") `

### Operating System

Ubuntu 22.04.4 LTS

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### 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

Open the contributing guide

Research direction

Start with the manual DAG trigger form and reproduce the issue using the provided object Param example on Airflow 2.11.0. Inspect the hidden textarea, its validation, and the browser console to trace why the entered value is not copied; done means a manually entered object value is validated and the DAG triggers successfully with any error visible to the user.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.