Hi all,
Following Tao Feng’s question to discuss this
PR<https://github.com/apache/airflow/pull/5010>
(AIRFLOW-4192<https://issues.apache.org/jira/browse/AIRFLOW-4192>), please
discuss here if you agree/disagree/would change.
-----------
The summary of the PR:
I was confused by the task context values and suggest to clean up and clarify
these variables. Some are derivations from other variables, some are
undocumented and unused, some are wrong (name doesn’t match the value). Please
discuss what you think of the removal of these variables:
* Removed yesterday_ds, yesterday_ds_nodash, tomorrow_ds,
tomorrow_ds_nodash. IMO the next_* and previous_* variables are useful since
these require complex logic to compute the next execution date, however would
leave computing the yesterday* and tomorrow* variables up to the user since
they are simple one-liners and don't relate to the DAG interval.
* Removed tables. This is a field in params, and is thus also accessible by
the user ({{ params.tables }}). Also, it was undocumented.
* Removed latest_date. It's the same as ds and was also undocumented.
* Removed inlets and outlets. Also undocumented, and have the
inlets/outlets ever worked/ever been used by anybody?
* Removed end_date and END_DATE. Both have the same value, so it doesn't
make sense to have both variables. Also, the value is ds which contains the
start date of the interval, so the naming didn't make sense to me. However, if
anybody argues in favour of adding "start_date" and "end_date" to provide the
start and end datetime of task instance intervals, I'd be happy to add them.
Cheers,
Bas