dabla commented on code in PR #55068:
URL: https://github.com/apache/airflow/pull/55068#discussion_r2489488832
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1109,6 +1149,14 @@ async def run_trigger(self, trigger_id, trigger):
name = self.triggers[trigger_id]["name"]
self.log.info("trigger %s starting", name)
try:
+ if context:
+ trigger.render_template_fields(context=context)
+
+ # Set RuntimeTaskInstance needed to be able to render templated
fields back to base datamodel
+ # until we get a proper split of the trigger
+ if isinstance(trigger.task_instance, RuntimeTaskInstance):
+ trigger.task_instance =
trigger.task_instance.to_task_instance()
Review Comment:
> (And would it be OK if we just keep the RuntimeTaskInstace here? Since
RuntimeTaskInstance is a TaskInstance subclass, it should just be compatible?)
Yes but I thought you didn't want it there that's why I did change that but
if not needed I'm happy to remove it as it makes code less complex
--
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]