mik-laj commented on a change in pull request #9170:
URL: https://github.com/apache/airflow/pull/9170#discussion_r440704385



##########
File path: airflow/api_connexion/endpoints/xcom_endpoint.py
##########
@@ -26,18 +32,35 @@ def delete_xcom_entry():
     raise NotImplementedError("Not implemented yet.")
 
 
-def get_xcom_entries():
+@provide_session
+def get_xcom_entries(dag_id, dag_run_id, task_id, session):
     """
     Get all XCom values
     """
-    raise NotImplementedError("Not implemented yet.")
+    query = session.query(XCom)
+    query = query.filter(and_(XCom.dag_id == dag_id,
+                              XCom.task_id == task_id))
+    query = query.join(DR, and_(XCom.dag_id == DR.dag_id, XCom.execution_date 
== DR.execution_date))
+    query = query.filter(DR.run_id == dag_run_id)
+    return 
xcom_collection_schema.dump(XComCollection(xcom_entries=query.all(), 
total_entries=query.count()))

Review comment:
       The total_entries field should contain the number of all items on all 
pages. This allows us to build pagination and build the user interface more 
easily.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to