dstandish commented on code in PR #42928:
URL: https://github.com/apache/airflow/pull/42928#discussion_r1797257933
##########
airflow/models/taskinstance.py:
##########
@@ -1631,13 +1631,12 @@ def _get_previous_ti(
@internal_api_call
-@provide_session
-def _update_rtif(ti, rendered_fields, session: Session | None = None):
+def _update_rtif(ti, rendered_fields):
from airflow.models.renderedtifields import RenderedTaskInstanceFields
rtif = RenderedTaskInstanceFields(ti=ti, render_templates=False,
rendered_fields=rendered_fields)
- RenderedTaskInstanceFields.write(rtif, session=session)
- RenderedTaskInstanceFields.delete_old_records(ti.task_id, ti.dag_id,
session=session)
+ RenderedTaskInstanceFields.write(rtif)
+ RenderedTaskInstanceFields.delete_old_records(ti.task_id, ti.dag_id)
Review Comment:
1. also, @ephraimbuddy i am pretty sure having session in the signature is
required by RPC endpoint logic here
https://github.com/apache/airflow/blob/ede7cb27fd39e233889d127490a2255df8c5d27d/airflow/api_internal/endpoints/rpc_api_endpoint.py#L234
##########
airflow/models/taskinstance.py:
##########
@@ -1631,13 +1631,12 @@ def _get_previous_ti(
@internal_api_call
-@provide_session
-def _update_rtif(ti, rendered_fields, session: Session | None = None):
+def _update_rtif(ti, rendered_fields):
from airflow.models.renderedtifields import RenderedTaskInstanceFields
rtif = RenderedTaskInstanceFields(ti=ti, render_templates=False,
rendered_fields=rendered_fields)
- RenderedTaskInstanceFields.write(rtif, session=session)
- RenderedTaskInstanceFields.delete_old_records(ti.task_id, ti.dag_id,
session=session)
+ RenderedTaskInstanceFields.write(rtif)
+ RenderedTaskInstanceFields.delete_old_records(ti.task_id, ti.dag_id)
Review Comment:
also, @ephraimbuddy i am pretty sure having session in the signature is
required by RPC endpoint logic here
https://github.com/apache/airflow/blob/ede7cb27fd39e233889d127490a2255df8c5d27d/airflow/api_internal/endpoints/rpc_api_endpoint.py#L234
--
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]