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

Disable dryrun autofetch for ClearInstance and MarkInstance #36941

Merged
merged 1 commit into from
Jan 22, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion airflow/www/static/js/api/useClearTaskDryRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const useClearTaskDryRun = ({
recursive,
failed,
mapIndexes = [],
enabled = false,
}: {
dagId: string;
runId: string;
Expand All @@ -52,6 +53,7 @@ const useClearTaskDryRun = ({
recursive: boolean;
failed: boolean;
mapIndexes?: number[];
enabled?: boolean;
}) =>
useQuery(
[
Expand Down Expand Up @@ -101,7 +103,8 @@ const useClearTaskDryRun = ({
},
}
);
}
},
{ enabled }
);

export default useClearTaskDryRun;
5 changes: 4 additions & 1 deletion airflow/www/static/js/api/useMarkTaskDryRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const useMarkTaskDryRun = ({
upstream,
downstream,
mapIndexes = [],
enabled = false,
}: {
dagId: string;
runId: string;
Expand All @@ -47,6 +48,7 @@ const useMarkTaskDryRun = ({
upstream: boolean;
downstream: boolean;
mapIndexes?: number[];
enabled?: boolean;
}) =>
useQuery(
[
Expand Down Expand Up @@ -84,7 +86,8 @@ const useMarkTaskDryRun = ({
return axios.get<AxiosResponse, MinimalTaskInstance[]>(confirmUrl, {
params,
});
}
},
{ enabled }
);

export default useMarkTaskDryRun;
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const ClearModal = ({
recursive,
failed,
mapIndexes,
enabled: isOpen,
});

const { mutateAsync: clearTask, isLoading } = useClearTask({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const MarkAsModal = ({
upstream,
downstream,
mapIndexes,
enabled: isOpen,
}
);

Expand Down