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 13:23:00 UTC

[jira] [Created] (AIRFLOW-6425) Schema Validation error when DAG.is_paused_upon_creation is set

Kaxil Naik created AIRFLOW-6425:
-----------------------------------

             Summary: Schema Validation error when DAG.is_paused_upon_creation is set
                 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
             Fix For: 1.10.8


The following DAG currently fails:


{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)