rustikk opened a new issue #20736:
URL: https://github.com/apache/airflow/issues/20736
### Apache Airflow version
2.2.3 (latest released)
### What happened
When triggering a dag with the JSON config with the params value set to a
dictionary with type="object" the default value is not displaying. The schema
validation is still working, if you pass a value that isn't a dictionary an
error will display in the UI.
### What you expected to happen
I expected the default value to show in the JSON config.
### How to reproduce
```
from datetime import datetime, timedelta
from airflow import DAG
from airflow.models.param import Param
from airflow.operators.python import PythonOperator
# unpausing causes this dag to run once, because there's only been
# one complete interval of 30 years since the epoch.
thirty_years = 1577862000 # seconds
with DAG(
"params_dictionaries",
start_date=datetime(1970, 1, 1),
schedule_interval=timedelta(seconds=thirty_years),
catchup=True,
params={"x": Param({"a": {3, 4, 5}, "b": {1, 2, 3}}, type="object")},
render_template_as_native_obj=True,
),
) as dag:
def fail_if_invalid(val):
print(val)
# assert type(val) == dict
PythonOperator(
task_id="ref_param",
python_callable=fail_if_invalid,
op_args=["{{ params['x'] }}"]
)
```
### Operating System
Docker (debian:buster)
### Versions of Apache Airflow Providers
2.2.3, 2.2.2, 2.2.1 gives an import error
### Deployment
Astronomer
### Deployment details
FROM quay.io/astronomer/ap-airflow-dev:2.2.3-onbuild
#FROM quay.io/astronomer/ap-airflow:2.2.2-buster-onbuild
#FROM quay.io/astronomer/ap-airflow-dev:2.2.1-buster-onbuild
### Anything else
Problem occurs everytime.
### 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)
--
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]