Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra and renderedTemplates as keys to skip camelCasing (#42206) #42208

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions airflow/www/static/js/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
6 changes: 2 additions & 4 deletions airflow/www/static/js/components/DatasetEventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion airflow/www/static/js/dag/details/graph/DatasetNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down