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

filter by multiple statuses in BulkActionsFilter #23772

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

jamiedemaria
Copy link
Contributor

@jamiedemaria jamiedemaria commented Aug 20, 2024

Summary & Motivation

You can select multiple statuses when you filter for runs in the UI, so we should support filtering backfills for multiple statuses. Alternatively we can wait until the dagster run status for a backfill is stored in the DB and then just allow filtering for multiple statuses of dagster run statuses

companion internal pr https://github.com/dagster-io/internal/pull/11113

How I Tested These Changes

unit tests

Copy link

github-actions bot commented Aug 20, 2024

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-gh69hjumo-elementl.vercel.app
https://jamie-statuses-plural-filter.core-storybook.dagster-docs.io

Built with commit 401a3f5.
This pull request is being automatically deployed with vercel-action

@jamiedemaria jamiedemaria force-pushed the jamie/bulk_actions-filters-gql branch from 246f841 to 667ee37 Compare August 21, 2024 14:11
@jamiedemaria jamiedemaria force-pushed the jamie/statuses-plural-filter branch from 95df830 to 1bf6d09 Compare August 21, 2024 14:11
@jamiedemaria jamiedemaria marked this pull request as ready for review August 21, 2024 15:28
@jamiedemaria jamiedemaria requested review from prha and sryza August 21, 2024 15:28
@jamiedemaria
Copy link
Contributor Author

@prha @sryza The main thing with this PR is if this is even worth adding.

We can filter runs by multiple statuses, so we want to be able to filter backfills by multiple statuses. But we filter runs by DagsterRun statuses, so that's the status we'll eventually filter backfills by.

I was thinking it could be useful to also allow filtering backfills by multiple BulkActionStatuses to enable us to do non-performant filtering before we store the dagster run status in the DB, but it might not really be worth it

Related - I'm wondering if we should have a more verbose name for the statuses attr to disambiguate the bulk action status from the dagster run status

@@ -841,14 +841,16 @@ def get_backfills(
) -> Sequence[PartitionBackfill]:
check.opt_inst_param(status, "status", BulkActionStatus)
query = db_select([BulkActionsTable.c.body, BulkActionsTable.c.timestamp])
Copy link
Member

Choose a reason for hiding this comment

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

I think we should go more aggressively.

We should deprecate status and error if they provide both status AND filters

@jamiedemaria jamiedemaria force-pushed the jamie/bulk_actions-filters-gql branch from 667ee37 to 24dafe8 Compare August 22, 2024 14:16
@jamiedemaria jamiedemaria force-pushed the jamie/statuses-plural-filter branch from 1bf6d09 to ab35503 Compare August 22, 2024 14:16
@jamiedemaria jamiedemaria force-pushed the jamie/bulk_actions-filters-gql branch from 24dafe8 to c7ee34c Compare August 22, 2024 15:22
@jamiedemaria jamiedemaria force-pushed the jamie/statuses-plural-filter branch from ab35503 to d14e094 Compare August 22, 2024 15:22
@jamiedemaria jamiedemaria force-pushed the jamie/bulk_actions-filters-gql branch from c7ee34c to 868bc51 Compare August 22, 2024 16:06
@jamiedemaria jamiedemaria force-pushed the jamie/statuses-plural-filter branch from d14e094 to a491770 Compare August 22, 2024 16:06
Base automatically changed from jamie/bulk_actions-filters-gql to master August 22, 2024 17:32
@jamiedemaria jamiedemaria force-pushed the jamie/statuses-plural-filter branch from a491770 to 401a3f5 Compare August 22, 2024 17:35
@jamiedemaria jamiedemaria merged commit 7b1f2c3 into master Aug 22, 2024
1 of 2 checks passed
@jamiedemaria jamiedemaria deleted the jamie/statuses-plural-filter branch August 22, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants