kani5hk commented on issue #4878: [AIRFLOW-4046] Added validations for 
poke_interval & timeout for Airflow Sensor
URL: https://github.com/apache/airflow/pull/4878#issuecomment-470915356
 
 
   @XD-DENG
   I tried providing a string as well as a negative number, to the 
poke_interval, in both the cases it breaks.
   Shouldn't we provide a check for string as well.
   
   `[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
   [2019-03-07 11:48:08,183] {models.py:1821} INFO - Marking task as 
FAILED.:cG9rZS1rYW5pc2hrcy1tYnAuY29ycC5hZG9iZS5jb20=`
   
   `[2019-03-08 14:56:16,166] {models.py:1790} ERROR - an integer is required 
(got type str):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)
   TypeError: an integer is required (got type str)
   [2019-03-08 14:56:16,168] {models.py:1821} INFO - Marking task as 
FAILED.:cG9rZS1rYW5pc2hrcy1tYnAuY29ycC5hZG9iZS5jb20=`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to