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

Kaxil Naik updated AIRFLOW-6425:
--------------------------------
    Description: 
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.

  was:
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.


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

Reply via email to