[ 
https://issues.apache.org/jira/browse/AIRFLOW-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16789073#comment-16789073
 ] 

ASF subversion and git services commented on AIRFLOW-4046:
----------------------------------------------------------

Commit ffb025997c1b70ab773fa08cbc70f222e7c69487 in airflow's branch 
refs/heads/master from kani5hk
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=ffb0259 ]

[AIRFLOW-4046] Add validations for poke_interval & timeout for Sensor (#4878)



> Validate poke_interval and timeout value in Airflow Sensor
> ----------------------------------------------------------
>
>                 Key: AIRFLOW-4046
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4046
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: operators
>    Affects Versions: 1.10.2
>            Reporter: Kanishk Lohumi
>            Assignee: Kanishk Lohumi
>            Priority: Major
>
> There is no validation being done on poke_interval & timeout values provided 
> to BaseSensor, this results in ValueError with negative value of 
> poke_interval when mode is *poke* because  time.sleep() doesn't support 
> negative values and give below error. {{}}
> {noformat}
> [2019-03-07 11:48:08,182] {models.py:1790} ERROR - sleep length must be 
> non-negative:cG9rZS1rYW5pc2hrcy1tYnAuY29ycC5hZG9iZS5jb20= Traceback (most 
> recent call last): File 
> "/Users/lohumi/Documents/airflow_1.10.2/lib/python3.6/site-packages/airflow/models.py",
>  line 1659, in _run_raw_task result = task_copy.execute(context=context) File 
> "/Users/lohumi/Documents/airflow_1.10.2/lib/python3.6/site-packages/airflow/sensors/base_sensor_operator.py",
>  line 112, in execute sleep(self.poke_interval) ValueError: sleep length must 
> be non-negative{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to