dstandish commented on code in PR #69565:
URL: https://github.com/apache/airflow/pull/69565#discussion_r3545341760
##########
airflow-core/src/airflow/models/taskmap.py:
##########
@@ -266,11 +266,13 @@ def expand_mapped_task(
dag_version_id=dag_version_id,
)
task.log.debug("Expanding TIs upserted %s", ti)
- task_instance_mutation_hook(ti, dag_run=dr)
- ti = session.merge(ti)
- ti.context_carrier = new_task_run_carrier(dr.context_carrier)
- ti.refresh_from_task(task, dag_run=dr) # session.merge() loses
task information.
- all_expanded_tis.append(ti)
+ _add_and_prime_mapped_ti(
+ ti, task, dr, session=session,
context_carrier=new_task_run_carrier(dr.context_carrier)
Review Comment:
ok the reason we don't set it here is cus at this point the TI already
exists but we are doing "revise map index if mapped"
that's why we don't add context carrier here -- it's already there
now.... initially i didn't add this helper. this was questionable but claude
suggested reducing duplication in an earlier round so i did.
it was only barely worth making a helper. we could get rid of it if you
think it's making it worse (and just inline the code, therefore you don't see
the non-passed arg
--
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]