TamGB opened a new issue, #24678:
URL: https://github.com/apache/airflow/issues/24678

   ### Apache Airflow version
   
   2.3.2 (latest released)
   
   ### What happened
   
   The variable `prev_execution_date` is empty on the first run meaning, all 
usage will automatically trigger a None error.
   
   ### What you think should happen instead
   
   A default date should be provided instead, either the DAG's `start_date` or 
a default `datetime.min` as during the first run, it will always trigger an 
error effectively preventing the DAG from running and hence, always returning 
an error.
   
   ### How to reproduce
   
   Pass the variables/macros to any Task:
   ```
   {
       "execution_datetime": '{{ ts_nodash }}',
       "prev_execution_datetime": '{{ prev_start_date_success | ts_nodash }}'  
#.strftime("%Y%m%dT%H%M%S")
   }
   ```
   
   Whilst the logical execution date (`execution_datetime`) works, the previous 
succesful logical execution date `prev_execution_datetime` automatically blows 
up when applying the `ts_nodash` filter. This effectively makes it impossible 
to use said macro ever, as it will always fail.
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to