You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2024/09/13 18:40:47 UTC
(airflow) 21/27: Add extra and renderedTemplates as keys to skip camelCasing (#42206) (#42208)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch sync_v2_10_test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 6a0aac8f72d2f6e024a72ca5551ea13a4f2ddc03
Author: Jens Scheffler <95...@users.noreply.github.com>
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 <br...@astronomer.io>
---
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>