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

add paginated partition key graphql fields to partitioned asset nodes #28774

Open
wants to merge 3 commits into
base: prha/dynamic_store_connection
Choose a base branch
from

Conversation

prha
Copy link
Member

@prha prha commented Mar 26, 2025

Summary & Motivation

Add paginated partition materializations field on asset node graphql fields.

How I Tested These Changes

BK

Copy link
Member Author

prha commented Mar 26, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@prha prha force-pushed the prha/dynamic_store_connection branch from 691d0a4 to 8194d38 Compare March 27, 2025 00:13
@prha prha force-pushed the prha/graphql_partition_keys branch from 56c1cbb to 476a4af Compare March 27, 2025 00:13
@prha prha force-pushed the prha/dynamic_store_connection branch from 8194d38 to 3479f85 Compare March 28, 2025 00:49
@prha prha force-pushed the prha/graphql_partition_keys branch 2 times, most recently from 1bb3cad to dccb5e4 Compare March 28, 2025 05:41
@prha prha force-pushed the prha/dynamic_store_connection branch from 3479f85 to 60ace3b Compare March 28, 2025 05:41
Copy link

github-actions bot commented Mar 28, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-jtz96hlz9-elementl.vercel.app
https://prha-graphql-partition-keys.core-storybook.dagster-docs.io

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

@prha prha changed the title add asset graph add paginated partition key graphql fields to partitioned asset nodes Mar 28, 2025
@prha prha marked this pull request as ready for review March 28, 2025 21:04
@prha prha force-pushed the prha/graphql_partition_keys branch from 9b77cc2 to 1d6f53d Compare April 1, 2025 22:30
@prha prha force-pushed the prha/dynamic_store_connection branch 2 times, most recently from 3f91631 to 596cbbd Compare April 1, 2025 22:34
@prha prha force-pushed the prha/graphql_partition_keys branch from 1d6f53d to 9842748 Compare April 1, 2025 22:34
@prha prha force-pushed the prha/dynamic_store_connection branch from 596cbbd to 6713344 Compare April 1, 2025 23:15
@prha prha force-pushed the prha/graphql_partition_keys branch 2 times, most recently from 63408e2 to 66476ee Compare April 2, 2025 00:41
@prha prha force-pushed the prha/dynamic_store_connection branch from 6713344 to 4fdf2de Compare April 3, 2025 23:51
@prha prha force-pushed the prha/graphql_partition_keys branch from 66476ee to 075048f Compare April 3, 2025 23:51
Comment on lines +1211 to +1215
if not self._dynamic_partitions_loader:
check.failed("dynamic_partitions_loader must be provided to get partition keys")

if not self._remote_node.is_partitioned:
return None
Copy link
Contributor

Choose a reason for hiding this comment

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

The order of these checks should be swapped to improve error handling. First check if not self._remote_node.is_partitioned: and return None, then check for the dynamic partitions loader.

The current implementation will raise an error about missing dynamic_partitions_loader even for non-partitioned assets, which is confusing since the loader isn't needed in that case. By checking partitioning first, you'll avoid unnecessary errors for non-partitioned assets.

Suggested change
if not self._dynamic_partitions_loader:
check.failed("dynamic_partitions_loader must be provided to get partition keys")
if not self._remote_node.is_partitioned:
return None
if not self._remote_node.is_partitioned:
return None
if not self._dynamic_partitions_loader:
check.failed("dynamic_partitions_loader must be provided to get partition keys")

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@prha prha force-pushed the prha/graphql_partition_keys branch from 075048f to ca6890c Compare April 4, 2025 17:47
@prha prha force-pushed the prha/dynamic_store_connection branch from 4fdf2de to 271b2d8 Compare April 4, 2025 17:47
@prha prha force-pushed the prha/graphql_partition_keys branch from ca6890c to dd30b2e Compare April 4, 2025 20:40
@prha prha force-pushed the prha/dynamic_store_connection branch from 271b2d8 to 5d46c06 Compare April 4, 2025 20:40
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