-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add GraphQL schema and resolvers for partitioned asset checks #32896
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
base: prha/asset-checks-03-asset-graph
Are you sure you want to change the base?
Add GraphQL schema and resolvers for partitioned asset checks #32896
Conversation
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit f4618a3. |
4213f4b to
a913f96
Compare
9fb5bd3 to
ec88c00
Compare
a913f96 to
abc217b
Compare
ec88c00 to
0abb3cf
Compare
e38d765 to
6d3c5ff
Compare
9de7d5a to
131d77c
Compare
6d3c5ff to
012ba9e
Compare
131d77c to
92c7290
Compare
012ba9e to
7c85971
Compare
92c7290 to
e23bbee
Compare
7c85971 to
25f28ca
Compare
e23bbee to
da8ded6
Compare
5dde55b to
cc9e6f0
Compare
b5b9078 to
a6173b9
Compare
This PR adds the GraphQL layer for partitioned asset checks: - Add partitionsDefinition field to GraphQL AssetCheck type - Add AssetCheckPartitionStatus type for partition-level status tracking - Add resolver for assetCheckPartitionStatuses query - Update asset graph schema to expose check partition information - Add partition filtering to asset check execution history queries - Generate TypeScript types for UI consumption 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
a6173b9 to
93049b2
Compare
82ecfd9 to
dae6172
Compare
Added comprehensive tests for retrieving asset check executions for partitioned assets via GraphQL: 1. test_partitioned_asset_check_executions - Tests basic partition support for asset checks - Creates check executions for multiple partitions - Verifies both IN_PROGRESS and completed (SUCCEEDED/FAILED) statuses - Validates evaluation metadata and descriptions per partition 2. test_partitioned_asset_check_executions_with_partition_filter - Tests the partition filter parameter in assetCheckExecutions query - Creates checks for different time-based partitions (2024-01, 2024-02) - Verifies filtering works correctly to isolate specific partition executions - Tests both filtered and unfiltered queries These tests ensure the GraphQL API correctly handles partitioned asset checks, which is essential for querying check status on a per-partition basis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The AssetCheckEvaluation class has a partition field that needs to be set when storing evaluation events for partitioned asset checks. This field is used by the storage layer to properly associate evaluations with their partitions, enabling partition-based filtering in the GraphQL API. Changes: - Added partition parameter to AssetCheckEvaluation in test events - This ensures evaluations are properly linked to their partitions - All partition filter tests now pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| MultiPartitionsSnap, | ||
| ), | ||
| ): | ||
| if start_idx and end_idx and isinstance(partitions_snap, TimeWindowPartitionsSnap): |
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.
This condition will incorrectly evaluate to False when start_idx is 0, preventing users from querying partitions starting at index 0.
if start_idx is not None and end_idx is not None and isinstance(partitions_snap, TimeWindowPartitionsSnap):The truthiness check (if start_idx and end_idx) treats 0 as falsy, so start_idx=0 will be ignored. This should use explicit is not None checks instead.
| if start_idx and end_idx and isinstance(partitions_snap, TimeWindowPartitionsSnap): | |
| if start_idx is not None and end_idx is not None and isinstance(partitions_snap, TimeWindowPartitionsSnap): |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.

Summary & Motivation
How I Tested These Changes
Changelog