-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Use single hidden asset job for all single-run asset executions #23747
Conversation
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 63de5da. |
c094220
to
9bfad11
Compare
c3255b1
to
1a237c0
Compare
1a237c0
to
6b35aa4
Compare
| { | ||
presetName: string; | ||
tags: PipelineRunTag[] | null; | ||
} | ||
| { | ||
isAssetJob: true; // partition set name not required | ||
partitionName: string | null; | ||
tags: PipelineRunTag[] | null; | ||
} | ||
| { | ||
partitionsSetName: string; // required for op jobs | ||
partitionName: string | null; | ||
tags: PipelineRunTag[] | null; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to give these types individual names just to clarify their purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah I like that, will add that instead of the isAssetJob key
const {data} = await client.query< | ||
ConfigPartitionSelectionQuery, | ||
ConfigPartitionSelectionQueryVariables | ||
>({ | ||
query: CONFIG_PARTITION_SELECTION_QUERY, | ||
variables, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this should really be considered as part of the page load imo if it's part of the launchpad page. Not a blocker for this PR but I'm thinking maybe we just have some kind of wrapper around async functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh this one might be tricky... I think for op jobs the launchpad loads and then you have to choose a partition before this config is fetched -- in some cases I think it does autopopulate (for presets maybe?) but not all the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me
This reverts commit 35f00aa. ## Summary & Motivation We had reverted the single implicit asset job stack after discovering that it caused problems in the UI. Those problems are fixed by the stack ending in [this GraphQL change](#23494) and [this frontend change](#23747). So this unreverts. It shouldn't be merged until that frontend change makes it in. ## How I Tested These Changes
…23747) ## Summary & Motivation Related: https://linear.app/dagster-labs/issue/FE-509/update-the-materialize-button-to-pull-jobpartitiondefinition-using-the This PR stacks on top of #23494: - On the backend, there is now just a single hidden asset job which contains all assets. - This asset job has no partition_set, but given a set of asset keys, you can still retrieve the list of available partitions and config + tags for a specific partition using new resolvers on the job. (Added in @sryza's PR) This requires some changes to expectations made on the front-end: - We no longer check both the partition definitions AND the presence of a partition set on the job the assets have in common. If you select partitioned assets you will get the partitions dialog. - When we launch a job targeting a single partition, OR open the launchpad and allow you to choose a partition, we now use a new resolver that is asset-specific to retrieve the config YAML + tags. (The "partition => config YAML" resolver previously required the partition set definition) The last point means that there is a different config-loader query for the hidden asset job and standard user-defined asset/ op jobs (which still use partition set definitions). I co-located both approaches in the same file to try to make things a bit easier to follow, but there's a bit of code duplication. Sidenote: This code is super old and still supports pipelines with multiple modes. If modes are fully gone I would love to rip that stuff out... ## How I Tested These Changes I updated the tests and also ran through a bunch of manual tests listed that I listed out in https://www.notion.so/dagster/Hidden-asset-job-change-test-cases-7a96046234da46f3a0e6b2a44e349474?pvs=4. --------- Co-authored-by: Sandy Ryza <[email protected]> Co-authored-by: bengotow <[email protected]> (cherry picked from commit 82e5040)
This reverts commit 35f00aa. ## Summary & Motivation We had reverted the single implicit asset job stack after discovering that it caused problems in the UI. Those problems are fixed by the stack ending in [this GraphQL change](#23494) and [this frontend change](#23747). So this unreverts. It shouldn't be merged until that frontend change makes it in. ## How I Tested These Changes (cherry picked from commit 2616f6d)
This reverts commit 35f00aa. ## Summary & Motivation We had reverted the single implicit asset job stack after discovering that it caused problems in the UI. Those problems are fixed by the stack ending in [this GraphQL change](#23494) and [this frontend change](#23747). So this unreverts. It shouldn't be merged until that frontend change makes it in. ## How I Tested These Changes
…23747) ## Summary & Motivation Related: https://linear.app/dagster-labs/issue/FE-509/update-the-materialize-button-to-pull-jobpartitiondefinition-using-the This PR stacks on top of #23494: - On the backend, there is now just a single hidden asset job which contains all assets. - This asset job has no partition_set, but given a set of asset keys, you can still retrieve the list of available partitions and config + tags for a specific partition using new resolvers on the job. (Added in @sryza's PR) This requires some changes to expectations made on the front-end: - We no longer check both the partition definitions AND the presence of a partition set on the job the assets have in common. If you select partitioned assets you will get the partitions dialog. - When we launch a job targeting a single partition, OR open the launchpad and allow you to choose a partition, we now use a new resolver that is asset-specific to retrieve the config YAML + tags. (The "partition => config YAML" resolver previously required the partition set definition) The last point means that there is a different config-loader query for the hidden asset job and standard user-defined asset/ op jobs (which still use partition set definitions). I co-located both approaches in the same file to try to make things a bit easier to follow, but there's a bit of code duplication. Sidenote: This code is super old and still supports pipelines with multiple modes. If modes are fully gone I would love to rip that stuff out... ## How I Tested These Changes I updated the tests and also ran through a bunch of manual tests listed that I listed out in https://www.notion.so/dagster/Hidden-asset-job-change-test-cases-7a96046234da46f3a0e6b2a44e349474?pvs=4. --------- Co-authored-by: Sandy Ryza <[email protected]> Co-authored-by: bengotow <[email protected]> (cherry picked from commit 82e5040)
This reverts commit 35f00aa. ## Summary & Motivation We had reverted the single implicit asset job stack after discovering that it caused problems in the UI. Those problems are fixed by the stack ending in [this GraphQL change](#23494) and [this frontend change](#23747). So this unreverts. It shouldn't be merged until that frontend change makes it in. ## How I Tested These Changes (cherry picked from commit 2616f6d)
Summary & Motivation
Related: https://linear.app/dagster-labs/issue/FE-509/update-the-materialize-button-to-pull-jobpartitiondefinition-using-the
This PR stacks on top of #23494:
On the backend, there is now just a single hidden asset job which contains all assets.
This asset job has no partition_set, but given a set of asset keys, you can still retrieve the list of available partitions and config + tags for a specific partition using new resolvers on the job. (Added in @sryza's PR)
This requires some changes to expectations made on the front-end:
We no longer check both the partition definitions AND the presence of a partition set on the job the assets have in common. If you select partitioned assets you will get the partitions dialog.
When we launch a job targeting a single partition, OR open the launchpad and allow you to choose a partition, we now use a new resolver that is asset-specific to retrieve the config YAML + tags. (The "partition => config YAML" resolver previously required the partition set definition)
The last point means that there is a different config-loader query for the hidden asset job and standard user-defined asset/ op jobs (which still use partition set definitions). I co-located both approaches in the same file to try to make things a bit easier to follow, but there's a bit of code duplication.
Sidenote:
This code is super old and still supports pipelines with multiple modes. If modes are fully gone I would love to rip that stuff out...
How I Tested These Changes
I updated the tests and also ran through a bunch of manual tests listed that I listed out in https://www.notion.so/dagster/Hidden-asset-job-change-test-cases-7a96046234da46f3a0e6b2a44e349474?pvs=4.