uranusjr commented on a change in pull request #18084:
URL: https://github.com/apache/airflow/pull/18084#discussion_r704869726
##########
File path: airflow/models/xcom.py
##########
@@ -68,12 +80,22 @@ def __repr__(self):
@classmethod
@provide_session
- def set(cls, key, value, execution_date, task_id, dag_id, session=None):
+ def set(cls, key, value, task_id, dag_id, execution_date=None,
run_id=None, session=None):
"""
Store an XCom value.
:return: None
"""
+ if not (execution_date is None) ^ (run_id is None):
+ raise ValueError("Exactly one of execution_date or run_id must be
passed")
Review comment:
I think argument count errors are usually TypeError?
--
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]