amoghrajesh commented on code in PR #46929:
URL: https://github.com/apache/airflow/pull/46929#discussion_r1963625268


##########
airflow/models/xcom.py:
##########
@@ -154,6 +154,9 @@ def set(
         """
         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:
   This will prevent future additions with key as empty or None. We should also 
be handling cases when empty key or "" is passed in the xcom_pull scenario.



-- 
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]

Reply via email to