You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Kaxil Naik (Jira)" <ji...@apache.org> on 2020/01/02 18:12:00 UTC

[jira] [Resolved] (AIRFLOW-6425) Serialization: Add missing DAG parameters to Json Schema

     [ https://issues.apache.org/jira/browse/AIRFLOW-6425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kaxil Naik resolved AIRFLOW-6425.
---------------------------------
    Resolution: Fixed

> Serialization: Add missing DAG parameters to Json Schema
> --------------------------------------------------------
>
>                 Key: AIRFLOW-6425
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6425
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core, DAG
>    Affects Versions: 1.10.7
>            Reporter: Kaxil Naik
>            Assignee: Kaxil Naik
>            Priority: Major
>             Fix For: 1.10.8
>
>
> The following DAG currently fails:
> Schema Validation error when DAG.is_paused_upon_creation is set
> {code:python}
> def make_simple_dag():
>     """Make very simple DAG to verify serialization result."""
>     dag = DAG(
>         dag_id='simple_dag',
>         default_args={
>             "retries": 1,
>             "retry_delay": timedelta(minutes=5),
>             "depends_on_past": False,
>         },
>         start_date=datetime(2019, 8, 1),
>         is_paused_upon_creation=True,
>     )
>     BaseOperator(task_id='simple_task', dag=dag, owner='airflow')
>     CustomOperator(task_id='custom_task', dag=dag)
>     return {'simple_dag': dag}
> {code}
> *Error*:
> {noformat}
>  jsonschema.exceptions.ValidationError: Additional properties are not allowed ('is_paused_upon_creation' was unexpected)
> {noformat}
> *Reason*:
> `is_paused_upon_creation` is in DAG.get_serialized_fields() but not in the Schema definition.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)