Skip to content

Commit

Permalink
fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
bengotow committed Nov 5, 2024
1 parent de3fbe0 commit 07654fe
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 65 deletions.
63 changes: 2 additions & 61 deletions js_modules/dagster-ui/packages/ui-core/src/runs/RunsFeedRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@ import styled from 'styled-components';

import {CreatedByTagCell, CreatedByTagCellWrapper} from './CreatedByTag';
import {QueuedRunCriteriaDialog} from './QueuedRunCriteriaDialog';
import {RUN_ACTIONS_MENU_RUN_FRAGMENT, RunActionsMenu} from './RunActionsMenu';
import {RunActionsMenu} from './RunActionsMenu';
import {RunRowTags} from './RunRowTags';
import {RunStatusTag, RunStatusTagWithStats} from './RunStatusTag';
import {DagsterTag} from './RunTag';
import {RunTargetLink} from './RunTargetLink';
import {RunStateSummary, RunTime, titleForRun} from './RunUtils';
import {getBackfillPath} from './RunsFeedUtils';
import {RunFilterToken} from './RunsFilterInput';
import {gql} from '../apollo-client';
import {RunTimeFragment} from './types/RunUtils.types';
import {RunsFeedTableEntryFragment} from './types/RunsFeedRow.types';
import {RunsFeedTableEntryFragment} from './types/RunsFeedTableEntryFragment.types';
import {RunStatus} from '../graphql/types';
import {BackfillActionsMenu, backfillCanCancelRuns} from '../instance/backfill/BackfillActionsMenu';
import {BACKFILL_STEP_STATUS_DIALOG_BACKFILL_FRAGMENT} from '../instance/backfill/BackfillFragments';
import {BackfillTarget} from '../instance/backfill/BackfillRow';
import {PARTITION_SET_FOR_BACKFILL_TABLE_FRAGMENT} from '../instance/backfill/BackfillTable';
import {HeaderCell, HeaderRow, RowCell} from '../ui/VirtualizedTable';
import {appendCurrentQueryParams} from '../util/appendCurrentQueryParams';

Expand Down Expand Up @@ -221,59 +218,3 @@ const RowGrid = styled(Box)`
display: block;
}
`;

export const RUNS_FEED_TABLE_ENTRY_FRAGMENT = gql`
fragment RunsFeedTableEntryFragment on RunsFeedEntry {
__typename
id
runStatus
creationTime
startTime
endTime
tags {
key
value
}
jobName
assetSelection {
... on AssetKey {
path
}
}
assetCheckSelection {
name
assetKey {
path
}
}
... on Run {
repositoryOrigin {
id
repositoryLocationName
repositoryName
}
...RunActionsMenuRunFragment
}
... on PartitionBackfill {
backfillStatus: status
partitionSetName
partitionSet {
id
...PartitionSetForBackfillTableFragment
}
assetSelection {
path
}
hasCancelPermission
hasResumePermission
isAssetBackfill
numCancelable
...BackfillStepStatusDialogBackfillFragment
}
}
${RUN_ACTIONS_MENU_RUN_FRAGMENT}
${PARTITION_SET_FOR_BACKFILL_TABLE_FRAGMENT}
${BACKFILL_STEP_STATUS_DIALOG_BACKFILL_FRAGMENT}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import {RUN_ACTIONS_MENU_RUN_FRAGMENT} from './RunActionsMenu';
import {gql} from '../apollo-client';
import {BACKFILL_STEP_STATUS_DIALOG_BACKFILL_FRAGMENT} from '../instance/backfill/BackfillFragments';
import {PARTITION_SET_FOR_BACKFILL_TABLE_FRAGMENT} from '../instance/backfill/BackfillTable';

export const RUNS_FEED_TABLE_ENTRY_FRAGMENT = gql`
fragment RunsFeedTableEntryFragment on RunsFeedEntry {
__typename
id
runStatus
creationTime
startTime
endTime
tags {
key
value
}
jobName
assetSelection {
... on AssetKey {
path
}
}
assetCheckSelection {
name
assetKey {
path
}
}
... on Run {
repositoryOrigin {
id
repositoryLocationName
repositoryName
}
...RunActionsMenuRunFragment
}
... on PartitionBackfill {
backfillStatus: status
partitionSetName
partitionSet {
id
...PartitionSetForBackfillTableFragment
}
assetSelection {
path
}
hasCancelPermission
hasResumePermission
isAssetBackfill
numCancelable
...BackfillStepStatusDialogBackfillFragment
}
}
${RUN_ACTIONS_MENU_RUN_FRAGMENT}
${PARTITION_SET_FOR_BACKFILL_TABLE_FRAGMENT}
${BACKFILL_STEP_STATUS_DIALOG_BACKFILL_FRAGMENT}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {FeatureFlag} from 'shared/app/FeatureFlags.oss';
import {runsPathWithFilters} from './RunsFilterInput';
import {featureEnabled} from '../app/Flags';

export const RUNS_FEED_CURSOR_KEY = `runs_before`;

export function getBackfillPath(id: string, isAssetBackfill: boolean) {
if (featureEnabled(FeatureFlag.flagLegacyRunsPage)) {
if (isAssetBackfill) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
RunTagValuesQuery,
RunTagValuesQueryVariables,
} from './types/RunsFilterInput.types';
import {RUNS_FEED_CURSOR_KEY} from './useRunsFeedEntries';
import {COMMON_COLLATOR} from '../app/Util';
import {__ASSET_JOB_PREFIX} from '../asset-graph/Utils';
import {RunStatus, RunsFilter} from '../graphql/types';
Expand All @@ -33,6 +32,7 @@ import {
} from '../ui/BaseFilters/useSuggestionFilter';
import {TimeRangeState, useTimeRangeFilter} from '../ui/BaseFilters/useTimeRangeFilter';
import {useRepositoryOptions} from '../workspace/WorkspaceContext/util';
import {RUNS_FEED_CURSOR_KEY} from './RunsFeedUtils';

export interface RunsFilterInputProps {
loading?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {useMemo} from 'react';

import {RUNS_FEED_TABLE_ENTRY_FRAGMENT} from './RunsFeedRow';
import {RUNS_FEED_TABLE_ENTRY_FRAGMENT} from './RunsFeedTableEntryFragment';
import {useSelectedRunsFeedTab} from './RunsFeedTabs';
import {RUNS_FEED_CURSOR_KEY} from './RunsFeedUtils';
import {SCHEDULED_RUNS_LIST_QUERY} from './ScheduledRunListRoot';
import {
ScheduledRunsListQuery,
Expand All @@ -15,8 +16,6 @@ import {RunsFilter} from '../graphql/types';

const PAGE_SIZE = 30;

export const RUNS_FEED_CURSOR_KEY = `runs_before`;

export function useRunsFeedEntries(
filter: RunsFilter,
currentTab: ReturnType<typeof useSelectedRunsFeedTab>,
Expand Down

0 comments on commit 07654fe

Please sign in to comment.