Skip to content

Remove unnecessary ti.current_state function.#48997

Merged
ashb merged 1 commit intomainfrom
small-tidyup-remove-ti-fn
Apr 9, 2025
Merged

Remove unnecessary ti.current_state function.#48997
ashb merged 1 commit intomainfrom
small-tidyup-remove-ti-fn

Conversation

@ashb
Copy link
Copy Markdown
Member

@ashb ashb commented Apr 9, 2025

This function has exactly one use outside of tests, in a cli command, where
the TI is fetched from the session directly before being passed to this
function, so we can simply access the state attribute and (modulo a tiny
window, which current_state() would still suffer from, albeit smaller) it
will give the same result

This is a small drive by tidy up.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

This function has exactly one use outside of tests, in a cli command, where
the TI is fetched from the session directly before being passed to this
function, so we can simply access the `state` attribute and (modulo a tiny
window, which `current_state()` would still suffer from, albeit smaller) it
will give the same result

This is a small drive by tidy up.
@ashb ashb requested a review from XD-DENG as a code owner April 9, 2025 09:01
@ashb ashb merged commit 63e7414 into main Apr 9, 2025
51 checks passed
@ashb ashb deleted the small-tidyup-remove-ti-fn branch April 14, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants