ashb commented on code in PR #58344:
URL: https://github.com/apache/airflow/pull/58344#discussion_r2532035775


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_xcom.py:
##########
@@ -161,6 +162,18 @@ def test_should_raise_404_for_non_existent_xcom(self, 
test_client):
         assert response.status_code == 404
         assert response.json()["detail"] == f"XCom entry with key: 
`{TEST_XCOM_KEY_2}` not found"
 
+    def test_should_respond_200_native_with_slash_key(self, test_client):
+        slash_key = "folder/sub/value"
+        self._create_xcom(slash_key, TEST_XCOM_VALUE)
+        encoded_key = quote(slash_key, safe="")
+        response = test_client.get(
+            
f"/dags/{TEST_DAG_ID}/dagRuns/{run_id}/taskInstances/{TEST_TASK_ID}/xcomEntries/{encoded_key}"

Review Comment:
   I would have expected this path to "just" be this:
   
`/dags/my_Dag/dagRuns/run_1/taskInstances/task_1/xcomEntries/folder/sub/value`
   
   Is there a reason you didn't.
   
   When _actually_ running starlette+FastAPI, does it treat these cases any 
differently?



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