This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 70e98528a6 do not camelcase xcom entries (#42182)
70e98528a6 is described below
commit 70e98528a6b81d3fd789a57a61ed32d704433f3b
Author: Brent Bovenzi <[email protected]>
AuthorDate: Wed Sep 11 19:24:25 2024 -0400
do not camelcase xcom entries (#42182)
---
airflow/www/static/js/api/index.ts | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/airflow/www/static/js/api/index.ts
b/airflow/www/static/js/api/index.ts
index 487197d608..a1442e5417 100644
--- a/airflow/www/static/js/api/index.ts
+++ b/airflow/www/static/js/api/index.ts
@@ -65,9 +65,14 @@ axios.interceptors.request.use((config) => {
return config;
});
-axios.interceptors.response.use((res: AxiosResponse) =>
- res.data ? camelcaseKeys(res.data, { deep: true }) : res
-);
+// Do not camelCase xCom entry results
+axios.interceptors.response.use((res: AxiosResponse) => {
+ const stopPaths = [];
+ if (res.config.url?.includes("/xcomEntries/")) {
+ stopPaths.push("value");
+ }
+ return res.data ? camelcaseKeys(res.data, { deep: true, stopPaths }) : res;
+});
axios.defaults.headers.common.Accept = "application/json";