Skip to content

Commit

Permalink
[ui] Allow searching jobs by Run ID (#15684)
Browse files Browse the repository at this point in the history
## Summary & Motivation

This is a small PR that makes it possible to filter runs by Run ID
(Fixes #15260).

We mostly already supported this, but there wasn't dropdown UI for the
filter. This filter only allows you to enter 36-character Run IDs in the
UUID format, which is unfortunate because the UI shows the 8 character
version. It seems like it'd actually take a significant amount of work
to allow "prefix-" matching against the 8-character display IDs because
this filter goes all the way down to the RunStorage interface and there
are multiple implementations.

To make this limitation more clear, I hacked in an "empty state" which
explains what you need to provide. (Screenshot 2), and changed the
`freeformSearchResult` callback so that it can return null to offer no
completion if the user's input is not a valid value.

While I was in here, I also created local vars in the RunsFilterInput
for some of the fillers that were inlined so the code is a bit more
consistent.

<img width="432" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/e82f6393-b7fa-4da1-b006-b4f972115fba">

<img width="436" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/c1f8a8c9-5414-4853-a46f-f42c50b0c2c7">

<img width="613" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/3f1e9fd9-4bb3-49cd-85e1-c3eb858b7a7d">

## How I Tested These Changes

I tested this by filtering for run IDs, pasting / typing various text
and reloading the pages to make sure the filter persists.

---------

Co-authored-by: bengotow <[email protected]>
  • Loading branch information
bengotow and bengotow authored Nov 10, 2023
1 parent ec5b4a5 commit 20fd07d
Show file tree
Hide file tree
Showing 9 changed files with 250 additions and 182 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import graph_upstream from '../icon-svgs/graph_upstream.svg';
import history from '../icon-svgs/history.svg';
import history_toggle_off from '../icon-svgs/history_toggle_off.svg';
import hourglass_bottom from '../icon-svgs/hourglass_bottom.svg';
import id from '../icon-svgs/id.svg';
import infinity from '../icon-svgs/infinity.svg';
import info from '../icon-svgs/info.svg';
import job from '../icon-svgs/job.svg';
Expand Down Expand Up @@ -219,6 +220,7 @@ export const Icons = {
youtube,
arrow_indent,
editor_role,
id,

graph,
graph_downstream,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const PAGE_SIZE = 25;
const ENABLED_FILTERS: RunFilterTokenType[] = [
'status',
'tag',
'id',
'created_date_before',
'created_date_after',
];
Expand Down
Loading

2 comments on commit 20fd07d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-78cdcwv69-elementl.vercel.app

Built with commit 20fd07d.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-gsej3karq-elementl.vercel.app

Built with commit 20fd07d.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.