This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun 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 58af9270fc Add extra and renderedTemplates as keys to skip camelCasing
(#42206) (#42208)
58af9270fc is described below
commit 58af9270fc5960ee60ffc23ce0e5f54be09fc110
Author: Jens Scheffler <[email protected]>
AuthorDate: Fri Sep 13 09:46:11 2024 +0200
Add extra and renderedTemplates as keys to skip camelCasing (#42206)
(#42208)
* Add extra, conf and renderedTemplates as keys to skip camelCasing
* remove conf, check for extra in lists
(cherry picked from commit c29f8dd7c9ba10278de516d7c9f548a5d84aea89)
Co-authored-by: Brent Bovenzi <[email protected]>
---
airflow/www/static/js/api/index.ts | 5 +++--
airflow/www/static/js/components/DatasetEventCard.tsx | 6 ++----
airflow/www/static/js/dag/details/graph/DatasetNode.tsx | 5 ++++-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/airflow/www/static/js/api/index.ts
b/airflow/www/static/js/api/index.ts
index a1442e5417..a4a45a08bf 100644
--- a/airflow/www/static/js/api/index.ts
+++ b/airflow/www/static/js/api/index.ts
@@ -65,9 +65,10 @@ axios.interceptors.request.use((config) => {
return config;
});
-// Do not camelCase xCom entry results
axios.interceptors.response.use((res: AxiosResponse) => {
- const stopPaths = [];
+ // Do not camelCase rendered_fields or extra
+ const stopPaths = ["rendered_fields", "extra", "dataset_events.extra"];
+ // Do not camelCase xCom entry results
if (res.config.url?.includes("/xcomEntries/")) {
stopPaths.push("value");
}
diff --git a/airflow/www/static/js/components/DatasetEventCard.tsx
b/airflow/www/static/js/components/DatasetEventCard.tsx
index e5fa2bc22c..2367c8efa9 100644
--- a/airflow/www/static/js/components/DatasetEventCard.tsx
+++ b/airflow/www/static/js/components/DatasetEventCard.tsx
@@ -60,10 +60,8 @@ const DatasetEventCard = ({
const selectedUri = decodeURIComponent(searchParams.get("uri") || "");
const containerRef = useContainerRef();
- const { fromRestApi, ...extra } = datasetEvent?.extra as Record<
- string,
- string
- >;
+ const { from_rest_api: fromRestApi, ...extra } =
+ datasetEvent?.extra as Record<string, string>;
return (
<Box>
diff --git a/airflow/www/static/js/dag/details/graph/DatasetNode.tsx
b/airflow/www/static/js/dag/details/graph/DatasetNode.tsx
index 6d87ce15da..bfd288f072 100644
--- a/airflow/www/static/js/dag/details/graph/DatasetNode.tsx
+++ b/airflow/www/static/js/dag/details/graph/DatasetNode.tsx
@@ -51,7 +51,10 @@ const DatasetNode = ({
}: NodeProps<CustomNodeProps>) => {
const containerRef = useContainerRef();
- const { fromRestApi } = (datasetEvent?.extra || {}) as Record<string,
string>;
+ const { from_rest_api: fromRestApi } = (datasetEvent?.extra || {}) as Record<
+ string,
+ string
+ >;
return (
<Popover>