[
https://issues.apache.org/jira/browse/AIRFLOW-814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bolke de Bruin resolved AIRFLOW-814.
------------------------------------
Resolution: Fixed
Fix Version/s: 1.8.0
Issue resolved by pull request #2029
[https://github.com/apache/incubator-airflow/pull/2029]
> Presto*CheckOperator should use keyword args during initialization
> ------------------------------------------------------------------
>
> Key: AIRFLOW-814
> URL: https://issues.apache.org/jira/browse/AIRFLOW-814
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Patrick McKenna
> Priority: Trivial
> Fix For: 1.8.0
>
>
> PrestoValueCheckOperator and PrestoIntervalCheckOperator don't forward
> user-supplied args as keyword args to their parent class initializers, which
> causes an exception to be raised by the apply_defaults decorator (see
> https://github.com/apache/incubator-airflow/blob/cf6d50c0e3d59ec9155be445c127c90a05cc90a2/airflow/utils/decorators.py#L46).
> For example:
> >>> from airflow.operators import PrestoIntervalCheckOperator
> >>> p = PrestoIntervalCheckOperator(task_id='id', table='table',
> >>> metrics_thresholds=0)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/.venv/lib/python3.5/site-packages/airflow/utils/decorators.py", line
> 86, in wrapper
> result = func(*args, **kwargs)
> File
> "/.venv/lib/python3.5/site-packages/airflow/operators/presto_check_operator.py",
> line 99, in __init__
> *args, **kwargs)
> File "/.venv/lib/python3.5/site-packages/airflow/utils/decorators.py", line
> 46, in wrapper
> "Use keyword arguments when initializing operators")
> airflow.exceptions.AirflowException: Use keyword arguments when initializing
> operators
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)