bugraoz93 commented on code in PR #47360:
URL: https://github.com/apache/airflow/pull/47360#discussion_r1982243850
##########
task_sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -769,10 +766,12 @@ def partial_subset(
memo = {id(self.task_dict): None, id(self.task_group): None}
dag = copy.deepcopy(self, memo) # type: ignore
- if isinstance(task_ids_or_regex, (str, Pattern)):
- matched_tasks = [t for t in self.tasks if
re2.findall(task_ids_or_regex, t.task_id)]
+ if isinstance(task_ids, str):
+ matched_tasks = [t for t in self.tasks if str(task_ids) in
t.task_id]
else:
- matched_tasks = [t for t in self.tasks if t.task_id in
task_ids_or_regex]
+ matched_tasks = [
+ t for t in self.tasks if any(task_id for task_id in task_ids
if str(task_id) in t.task_id)
+ ]
Review Comment:
I had doubts about changing this. I first thought we were missing a case.
After checking again, they are the same. I agree, converted back. It is easier
and simpler.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]