andrewgodwin commented on a change in pull request #15389:
URL: https://github.com/apache/airflow/pull/15389#discussion_r638272734
##########
File path: airflow/api_connexion/endpoints/task_instance_endpoint.py
##########
@@ -248,7 +248,7 @@ def post_clear_task_instances(dag_id: str, session=None):
error_message = f"Dag id {dag_id} not found"
raise NotFound(error_message)
reset_dag_runs = data.pop('reset_dag_runs')
- task_instances = dag.clear(get_tis=True, **data)
+ task_instances = dag.clear(get_ti_instances=True, **data)
Review comment:
Ah, but what I had to do here was separate the two concepts of:
- TaskInstance model instances
- TaskInstance PK tuples
Since I had to re-write `dag.clear()` to remove a UNION, and wanted to make
it slightly more efficient in the process, the internals of that function now
work on PK tuples to deduplicate (rather than de-duplicating on all fields as
previously), so it needed a new pair of keyword arguments to say what output
you wanted. I felt `ti_instances` was a reasonable solution since it's both
different to the old name (so I could make sure I had caught all references),
and because they are actually TaskInstance (model) instances.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]