dstandish commented on a change in pull request #21806:
URL: https://github.com/apache/airflow/pull/21806#discussion_r816508194
##########
File path: airflow/models/xcom.py
##########
@@ -160,26 +160,26 @@ def set(
message = "Passing 'execution_date' to 'XCom.set()' is deprecated.
Use 'run_id' instead."
warnings.warn(message, DeprecationWarning, stacklevel=3)
try:
- dagrun_id, run_id = (
+ dag_run_id, run_id = (
session.query(DagRun.id, DagRun.run_id)
.filter(DagRun.dag_id == dag_id, DagRun.execution_date ==
execution_date)
.one()
)
except NoResultFound:
raise ValueError(f"DAG run not found on DAG {dag_id!r} at
{execution_date}") from None
- elif run_id == IN_MEMORY_DAGRUN_ID:
- dagrun_id = -1
+ elif run_id == IN_MEMORY_RUN_ID:
+ dag_run_id = -1
else:
- dagrun_id = session.query(DagRun.id).filter_by(dag_id=dag_id,
run_id=run_id).scalar()
- if dagrun_id is None:
+ dag_run_id = session.query(DagRun.id).filter_by(dag_id=dag_id,
run_id=run_id).scalar()
+ if dag_run_id is None:
raise ValueError(f"DAG run not found on DAG {dag_id!r} with ID
{run_id!r}")
value = cls.serialize_value(
value=value,
key=key,
task_id=task_id,
dag_id=dag_id,
- run_id=dagrun_id,
+ run_id=dag_run_id,
Review comment:
```suggestion
run_id=run_id,
```
--
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]