fix(ui/ingest): status update properly (#14395)

This commit is contained in:
Aseem Bansal 2025-08-10 18:52:41 +05:30 committed by GitHub
parent afccda66c1
commit 38e561e006
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View File

@ -13,3 +13,11 @@ export const EXECUTION_REQUEST_STATUS_ROLLBACK_FAILED = 'ROLLBACK_FAILED';
export const EXECUTION_REQUEST_STATUS_DUPLICATE = 'DUPLICATE'; export const EXECUTION_REQUEST_STATUS_DUPLICATE = 'DUPLICATE';
export const EXECUTION_REQUEST_STATUS_PENDING = 'PENDING'; export const EXECUTION_REQUEST_STATUS_PENDING = 'PENDING';
export const EXECUTION_REQUEST_STATUS_LOADING = 'LOADING'; export const EXECUTION_REQUEST_STATUS_LOADING = 'LOADING';
export const EXECUTION_REQUEST_STATUS_ACTIVE = [
EXECUTION_REQUEST_STATUS_RUNNING,
EXECUTION_REQUEST_STATUS_ROLLING_BACK,
EXECUTION_REQUEST_STATUS_PENDING,
EXECUTION_REQUEST_STATUS_UP_FOR_RETRY,
EXECUTION_REQUEST_STATUS_LOADING,
];

View File

@ -1,5 +1,6 @@
import { import {
EXECUTION_REQUEST_STATUS_ABORTED, EXECUTION_REQUEST_STATUS_ABORTED,
EXECUTION_REQUEST_STATUS_ACTIVE,
EXECUTION_REQUEST_STATUS_CANCELLED, EXECUTION_REQUEST_STATUS_CANCELLED,
EXECUTION_REQUEST_STATUS_DUPLICATE, EXECUTION_REQUEST_STATUS_DUPLICATE,
EXECUTION_REQUEST_STATUS_FAILURE, EXECUTION_REQUEST_STATUS_FAILURE,
@ -17,10 +18,7 @@ import {
import { ExecutionRequest } from '@types'; import { ExecutionRequest } from '@types';
export function isExecutionRequestActive(executionRequest: ExecutionRequest) { export function isExecutionRequestActive(executionRequest: ExecutionRequest) {
return ( return EXECUTION_REQUEST_STATUS_ACTIVE.includes(executionRequest?.result?.status ?? '');
executionRequest.result?.status === EXECUTION_REQUEST_STATUS_RUNNING ||
executionRequest.result?.status === EXECUTION_REQUEST_STATUS_ROLLING_BACK
);
} }
export const getExecutionRequestStatusIcon = (status: string) => { export const getExecutionRequestStatusIcon = (status: string) => {

View File

@ -306,6 +306,7 @@ export const IngestionSourceList = ({
variables: { variables: {
input: { ingestionSourceUrn: urn }, input: { ingestionSourceUrn: urn },
}, },
refetchQueries: ['listIngestionExecutionRequests'],
}) })
.then(() => { .then(() => {
setSourcesToRefetch((prev) => new Set(prev).add(urn)); setSourcesToRefetch((prev) => new Set(prev).add(urn));