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

ASF GitHub Bot commented on AIRFLOW-4046:
-----------------------------------------

kani5hk commented on pull request #4877: [AIRFLOW-4046] Added validations for 
poke_interval & timeout for Airflow Sensor
URL: https://github.com/apache/airflow/pull/4877
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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