Skip to content

Conversation

@uranusjr
Copy link
Member

Previously, the API converts dag_run_id from the request into a start/end date pair to call the underlying Python function. This however does not work correctly if the requested DAG run has logical_date=None, resulting in both start/end dates to be set to None, and ALL DAG runs selected.

Since the underlying Python function accepts a run_id directly, we can simply pass in dag_run_id in the API implementation instead to get the correct result.

Fix #46804.

Previously, the API converts dag_run_id from the request into a
start/end date pair to call the underlying Python function. This however
does not work correctly if the requested DAG run has logical_date=None,
resulting in both start/end dates to be set to None, and ALL DAG runs
selected.

Since the underlying Python function accepts a run_id directly, we can
simply pass in dag_run_id in the API implementation instead to get the
correct result.
@ashb
Copy link
Member

ashb commented Feb 19, 2025

This will fix the first issue, but what should Past or Future buttons in the UI do when logical date = None?

@uranusjr
Copy link
Member Author

We should probably either disable them or make them do nothing. There’s no corresponding Python function for them too.

@uranusjr uranusjr merged commit 6a7203a into apache:main Feb 19, 2025
45 checks passed
@uranusjr uranusjr deleted the fix-api-clear-ti branch February 19, 2025 09:23
ntr pushed a commit to ntr/airflow that referenced this pull request Feb 20, 2025
Previously, the API converts dag_run_id from the request into a
start/end date pair to call the underlying Python function. This however
does not work correctly if the requested DAG run has logical_date=None,
resulting in both start/end dates to be set to None, and ALL DAG runs
selected.

Since the underlying Python function accepts a run_id directly, we can
simply pass in dag_run_id in the API implementation instead to get the
correct result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clear task instance API is picking up TIs from previous runs

2 participants