Commit d5bc507
Pass dynamic_partitions_store to has_partition_key for DynamicPartitionsDefinition and MultiPartitionsDefinition
Fixed issue where DynamicPartitionsDefinition.has_partition_key was being
called without the required dynamic_partitions_store parameter, causing
tests to fail with "The instance is not available to load partitions" error.
Changes:
1. Updated MultiPartitionsDefinition.has_partition_key to accept current_time
and dynamic_partitions_store parameters, passing them through to
DynamicPartitionsDefinition dimensions
2. Updated run_domain._get_planned_partitions to pass dynamic_partitions_store
when checking has_partition_key for both DynamicPartitionsDefinition and
MultiPartitionsDefinition
This ensures dynamic partitions can access the instance to load partition keys,
whether they're used directly or as dimensions in multi-partitions.
Fixes: test_dynamic_partitioned_run, test_unfetched_partitioned_events_are_unconsumed,
test_assets (dynamic_asset_partitions)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 33ba92c commit d5bc507
2 files changed
Lines changed: 44 additions & 7 deletions
File tree
- python_modules/dagster/dagster/_core
- definitions/partitions/definition
- instance/runs
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
194 | 203 | | |
195 | 204 | | |
196 | 205 | | |
| |||
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
210 | 229 | | |
211 | 230 | | |
212 | 231 | | |
| |||
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
958 | 971 | | |
959 | 972 | | |
960 | 973 | | |
| |||
985 | 998 | | |
986 | 999 | | |
987 | 1000 | | |
988 | | - | |
989 | | - | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
990 | 1008 | | |
991 | 1009 | | |
992 | 1010 | | |
| |||
0 commit comments