apache / apache/airflow

Add prev_ds and prev_ds_nodash back to the standard macros and do not deprecate them

Open
#49,073 2 comments 0 reactions 0 assignees View on GitHub
kind:feature needs-triage
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Description

I believe it makes sense to move `prev_ds` and `prev_ds_nodash` macros back into the standard macros list and not to deprecate them. They are extremely useful macros and from what I can tell on the documentation page their is not an obvious way to replicate them (please correct me if I'm wrong!). Especially considering that similar newer macros such as `{{ prev_start_date_success }}` seem to be a more restrictive version of this, it would make sense to keep it I think.

### Use case/motivation

Use to easily get previous execution date of current dag

### Related issues

_No response_

### Are you willing to submit a 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)

Contributor guide

Open the contributing guide

Research direction

Start by locating Airflow's standard macro definitions and the documentation page for prev_ds and prev_ds_nodash. Check how these macros are currently marked for deprecation and find the related tests. Done means both macros are available as standard macros without deprecation treatment, with coverage confirming their previous-execution-date behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.