uranusjr commented on code in PR #46929:
URL: https://github.com/apache/airflow/pull/46929#discussion_r1964047662
##########
airflow/models/xcom.py:
##########
@@ -339,6 +342,9 @@ def get_many(
"""
from airflow.models.dagrun import DagRun
+ if not key:
+ raise ValueError(f"XCom key must be a non-empty string. Received:
{key!r}")
+
Review Comment:
We should support a “null” value for key here since it should be possible
for the user to say “fetch all XComs associated to this task”. The value does
not need to be None, but None is a reasonable sentinel here.
If we use None to mean “don’t filter by `key`”, this check should be added
to places that use get_many where not filtering by `key` does not make sense,
such as `xcom_pull`.
--
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]