Open Gollum999 opened 2 weeks ago
Since this would be adding functionality, I think this is a feature request and not a bug. I think skipping the task instance whose end_date
is passed makes sense.
To work around this, would it make sense to remove the deprecated task from the Dag? Also, the logical_date
is already available via task instance context.
In my case, I do not want to remove the deprecated task for at least a few months because we may still need to backfill the data that it produces.
Using logical_date
inside of the task instance is a good idea, I had not thought of that. I'd imagine I can conditionally raise AirflowSkipException
to get the behavior I am looking for. Thanks!
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.7.1
What happened?
I have a task with multiple upstream dependencies, one of which is a deprecated dataset. To retire this dataset, I set its task's
end_date
to the last day that the data was available, and I updated the code for the downstream task to stop looking for that data. Now, the downstream task is stuck in "No status" and must be manually started from the command line.The only
trigger_rule
s that work around this issue are ones that have the wrong semantics for my task (e.g.always
). I also want to make sure we can still backfill the deprecated dataset if needed, so I want to keep the DAG structure and dependencies backward compatible.What you think should happen instead?
In descending order of personal preference:
start_date
/end_date
window, not just one.trigger_rule
s.logical_date
at the DAG level viaAirflowParsingContext
, so that dependencies could be conditionally changed:How to reproduce
Operating System
CentOS Stream 8
Versions of Apache Airflow Providers
N/A
Deployment
Other
Deployment details
Self-hosted/standalone
Anything else?
No response
Are you willing to submit PR?
Code of Conduct