From 52816a4bd72f7c47849e0dd90907d6522b061ab8 Mon Sep 17 00:00:00 2001 From: jamiedemaria Date: Mon, 7 Oct 2024 16:57:09 -0400 Subject: [PATCH] incorporate checkbox value when querying for status counts (#25070) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary & Motivation Updates the runs feed UI to pass the value of the `show runs within backfills` checkbox to the counts query so that we display the correct number of results in the status tabs ## How I Tested These Changes Screenshot 2024-10-04 at 4 16 34 PM Screenshot 2024-10-04 at 4 16 47 PM ## Changelog - [ ] `NEW` _(added new feature or capability)_ - [X] `BUGFIX` [ui] The experimental Runs page now correctly shows the number of Queued and In Progress runs and backfills based on whether the "Show runs within backfills" box is checked. - [ ] `DOCS` _(added or updated documentation)_ --- .../dagster-ui/packages/ui-core/client.json | 2 +- .../packages/ui-core/src/runs/RunsFeedTabs.tsx | 17 ++++++++++++++--- .../src/runs/types/RunsFeedTabs.types.ts | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/client.json b/js_modules/dagster-ui/packages/ui-core/client.json index 45e04ae56982e..c332b6dd5d277 100644 --- a/js_modules/dagster-ui/packages/ui-core/client.json +++ b/js_modules/dagster-ui/packages/ui-core/client.json @@ -131,7 +131,7 @@ "Terminate": "67acf403eb320a93c9a9aa07f675a1557e0887d499cd5598f1d5ff360afc15c0", "LaunchPipelineReexecution": "d21e4ecaf3d1d163c4772f1d847dbdcbdaa9a40e6de0808a064ae767adf0c311", "RunsFeedRootQuery": "fbfc82cccaebc1698305767c04c4dc16ed15b7a272342135d5a83745ffece37e", - "RunFeedTabsCountQuery": "5ddccded028ae94b64bda3c2b850bcc8f384de9851c0dd393f158b2a53469262", + "RunFeedTabsCountQuery": "fe1a07dfc152faddc4fd8936aee1f856b8d8308edf8078bdaa4e5cd111e044cc", "RunTagKeysQuery": "833a405f7cb8f30c0901bc8a272edb51ac5281ebdf563e3017eace5d6976b2a9", "RunTagValuesQuery": "0c0a9998c215bb801eb0adcd5449c0ac4cf1e8efbc6d0fcc5fb6d76fcc95cb92", "ScheduledRunsListQuery": "2650d8ebdfc444fe76fcf8acd9ff54f9ecacdb680b1d83e3f487cb71dd0c7eae", diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFeedTabs.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFeedTabs.tsx index c19a92866fd6e..8a56471e154cb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFeedTabs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFeedTabs.tsx @@ -38,6 +38,7 @@ export const useRunsFeedTabs = (filter: RunsFilter = {}, includeRunsFromBackfill variables: { queuedFilter: {...filter, statuses: Array.from(queuedStatuses)}, inProgressFilter: {...filter, statuses: Array.from(inProgressStatuses)}, + includeRunsFromBackfills, }, }, ); @@ -140,13 +141,23 @@ export const useSelectedRunsFeedTab = (filterTokens: TokenizingFieldValue[]) => }; export const RUN_FEED_TABS_COUNT_QUERY = gql` - query RunFeedTabsCountQuery($queuedFilter: RunsFilter!, $inProgressFilter: RunsFilter!) { - queuedCount: runsFeedCountOrError(filter: $queuedFilter) { + query RunFeedTabsCountQuery( + $queuedFilter: RunsFilter! + $inProgressFilter: RunsFilter! + $includeRunsFromBackfills: Boolean! + ) { + queuedCount: runsFeedCountOrError( + filter: $queuedFilter + includeRunsFromBackfills: $includeRunsFromBackfills + ) { ... on RunsFeedCount { count } } - inProgressCount: runsFeedCountOrError(filter: $inProgressFilter) { + inProgressCount: runsFeedCountOrError( + filter: $inProgressFilter + includeRunsFromBackfills: $includeRunsFromBackfills + ) { ... on RunsFeedCount { count } diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/types/RunsFeedTabs.types.ts b/js_modules/dagster-ui/packages/ui-core/src/runs/types/RunsFeedTabs.types.ts index 555414b778daf..edfef6c07c70e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/types/RunsFeedTabs.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/types/RunsFeedTabs.types.ts @@ -5,6 +5,7 @@ import * as Types from '../../graphql/types'; export type RunFeedTabsCountQueryVariables = Types.Exact<{ queuedFilter: Types.RunsFilter; inProgressFilter: Types.RunsFilter; + includeRunsFromBackfills: Types.Scalars['Boolean']['input']; }>; export type RunFeedTabsCountQuery = { @@ -13,4 +14,4 @@ export type RunFeedTabsCountQuery = { inProgressCount: {__typename: 'PythonError'} | {__typename: 'RunsFeedCount'; count: number}; }; -export const RunFeedTabsCountQueryVersion = '5ddccded028ae94b64bda3c2b850bcc8f384de9851c0dd393f158b2a53469262'; +export const RunFeedTabsCountQueryVersion = 'fe1a07dfc152faddc4fd8936aee1f856b8d8308edf8078bdaa4e5cd111e044cc';