[
https://issues.apache.org/jira/browse/AIRFLOW-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15856773#comment-15856773
]
ASF subversion and git services commented on AIRFLOW-814:
---------------------------------------------------------
Commit d428a90286a8d34db65bb8f4d8252fbbe9665e55 in incubator-airflow's branch
refs/heads/master from [~patrickmckenna]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=d428a90 ]
[AIRFLOW-814] Fix Presto*CheckOperator.__init__
Use keyword args when initializing a
Presto*CheckOperator.
Closes #2029 from patrickmckenna/fix-presto-check-
operators
> 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
>
> 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)