airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sam elamin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-1772) Google Updated Sensor doesnt work with CRON expressions
Date Wed, 01 Nov 2017 11:09:02 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

sam elamin updated AIRFLOW-1772:
--------------------------------
    Description: 
Hi

I noticed that the [Update Sensor|https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L73]
does not work with a cron expression set as the schedule interval

According to the airflow docs a scheduler interval can be a timedelta or a string

When its a cron expression the schedule is a string and hence this [line | https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L70]
breaks 


the error is below

''str' object is not callable'

Ideally that line should check if the interval is a cron expression and if it is convert it
to a time delta 


Also as a side note i noticed that the update sensor doesnt match regex and has to be exact,
surly adding regex support here would make sense since the gsutil cli does this as well



  was:
Hi

I noticed that the [Update Sensor|https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L73]
does not work with a cron expression set as the schedule interval

According to the airflow docs a scheduler interval can be a timedelta or a string

When its a cron expression the schedule is a string and hence this [line | https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L70]
breaks 


the error is below

''str' object is not callable'

Ideally that line should check if the interval is a cron expression and if it is convert it
to a time delta 




> Google Updated Sensor doesnt work with CRON expressions 
> --------------------------------------------------------
>
>                 Key: AIRFLOW-1772
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1772
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: gcp
>            Reporter: sam elamin
>            Priority: Normal
>
> Hi
> I noticed that the [Update Sensor|https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L73]
does not work with a cron expression set as the schedule interval
> According to the airflow docs a scheduler interval can be a timedelta or a string
> When its a cron expression the schedule is a string and hence this [line | https://github.com/apache/incubator-airflow/blob/master/airflow/contrib/sensors/gcs_sensor.py#L70]
breaks 
> the error is below
> ''str' object is not callable'
> Ideally that line should check if the interval is a cron expression and if it is convert
it to a time delta 
> Also as a side note i noticed that the update sensor doesnt match regex and has to be
exact, surly adding regex support here would make sense since the gsutil cli does this as
well



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message