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

[ui] Fix launchpad warning about missing partition for hidden asset job #27340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bengotow
Copy link
Collaborator

@bengotow bengotow commented Jan 24, 2025

This is a follow-up to https://github.com/dagster-io/dagster/pull/25971/files

Resolves https://linear.app/dagster-labs/issue/FE-765/non-partitioned-run-of-partitioned-job

Summary & Motivation

In a release this fall, we combined all the hidden asset jobs into a single __ASSET_JOB that spans all assets. The objective of this was to enable automatic-partition-mapping and allow users to materialize any arbitrary subset of assets. To do this, the partition sets were removed from the hidden job and the appropriate partition set is determined on the fly based on the assets within the job you’re interested in.

This broke the warning in this modal, since the job has partitioned assets but does not have partitionSets.

This looks like a big code change but I just took all the existing loader logic out of ConfigEditorConfigPicker’s partition set + partition picker, and moved it up one layer so that it could be referenced in the warning as well. The queries / transformations of the data, etc. haven't been changed.

How I Tested These Changes

This was fairly easy to repro once I figured it out - just go to the graph (not an asset job) and choose "Open Launchpad" from the materialize dropdown with a partitioned asset selected.

Changelog

[ui] When launching partitioned assets in the launchpad from the global graph, Dagster will warn if you have not made a partition selection.

@bengotow bengotow force-pushed the bengotow-2025-01/FE-765 branch from 647ab00 to 4566af2 Compare January 24, 2025 02:42
@@ -573,7 +584,10 @@ const LaunchpadSession = (props: LaunchpadSessionProps) => {
}

let launchButtonWarning: string | undefined;
if (partitionSets.results.length && isMissingPartition(currentSession.base)) {
if (
(partitionSets.results.length || partitionSetDetails.doesAnyAssetHavePartitions) &&
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the fix! Lifting the data fetching up out of ConfigEditorConfigPicker into a hook is just so that we can reference doesAnyAssetHavePartitions here.

Copy link

github-actions bot commented Jan 24, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-58b0r00zm-elementl.vercel.app
https://bengotow-2025-01-FE-765.core-storybook.dagster-docs.io

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

@bengotow bengotow force-pushed the bengotow-2025-01/FE-765 branch from 4566af2 to 5cf1d66 Compare January 24, 2025 02:44
This is a follow-up to https://github.com/dagster-io/dagster/pull/25971/files

Resolves https://linear.app/dagster-labs/issue/FE-765/non-partitioned-run-of-partitioned-job

In a release this fall, we combined all the hidden asset jobs into a single `__ASSET_JOB` that spans all assets. The objective of this was to enable partition-mapping and allow users to materialize any arbitrary subset of assets.  To do this, the partition sets were removed from the hidden job and the appropriate partition set is determined on the fly based on the assets within the job you’re interested in.

This broke the warning in this modal, since the job has partitioned assets but does not have `partitionSets`.

This looks like a big code change but I just took all the existing loader logic out of ConfigEditorConfigPicker’s partition set + partition picker, and moved it up one layer so that it could be referenced in the warning as well.
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.

1 participant