This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new e36a64d24c do not camelcase xcom entries (#42182) (#42187)
e36a64d24c is described below
commit e36a64d24ca08e6b782c595ea349287baf361b7d
Author: Jens Scheffler <[email protected]>
AuthorDate: Thu Sep 12 01:57:42 2024 +0200
do not camelcase xcom entries (#42182) (#42187)
(cherry picked from commit 70e98528a6b81d3fd789a57a61ed32d704433f3b)
Co-authored-by: Brent Bovenzi <[email protected]>
---
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";