Commit 6d59727
[core] swap AssetCheckSummaryRecord for AssetCheckExecutionRecord in asset_graph_view (#24773)
## Summary
- Three call sites in `asset_graph_view.py`
(`compute_subset_with_status`, `_compute_latest_check_run_matches`,
`_compute_updated_since_time_subset`) loaded an
`AssetCheckSummaryRecord` only to read `last_check_execution_record`.
- Swap them to `AssetCheckExecutionRecord.gen`, which routes through
`get_latest_asset_check_execution_by_key` — a single batched query (OSS)
or N queries (cloud) — and returns exactly that record.
- The replaced `get_asset_check_summary_records` path fires N or 2N
queries per call to additionally populate
`last_completed_check_execution_record`, which these callers discard.
## Test plan
- [x] `just ruff`
- [x] `just ty` (0 errors)
- [x] `tox -e py312-asset_defs_tests -- -k asset_graph_view` (66 passed)
- [x] `tox -e py312-declarative_automation_tests -- -k check` (22
passed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Internal-RevId: 7291b6d9e3ed62901c1d7d3968fe9423b392242e1 parent 0fbacae commit 6d59727
4 files changed
Lines changed: 171 additions & 25 deletions
File tree
- python_modules
- dagster-cloud/dagster_cloud/storage/event_logs
- dagster
- dagster_tests/storage_tests/utils
- dagster/_core/asset_graph_view
Lines changed: 38 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
129 | 151 | | |
130 | 152 | | |
131 | 153 | | |
| |||
134 | 156 | | |
135 | 157 | | |
136 | 158 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 159 | + | |
144 | 160 | | |
145 | 161 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 162 | + | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
| |||
297 | 307 | | |
298 | 308 | | |
299 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
300 | 323 | | |
301 | 324 | | |
302 | 325 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
1247 | | - | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1248 | 1264 | | |
1249 | 1265 | | |
1250 | 1266 | | |
| |||
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
| 598 | + | |
600 | 599 | | |
601 | 600 | | |
602 | 601 | | |
| |||
882 | 881 | | |
883 | 882 | | |
884 | 883 | | |
| 884 | + | |
885 | 885 | | |
886 | | - | |
887 | 886 | | |
888 | 887 | | |
889 | | - | |
890 | | - | |
| 888 | + | |
891 | 889 | | |
892 | 890 | | |
893 | 891 | | |
| |||
1011 | 1009 | | |
1012 | 1010 | | |
1013 | 1011 | | |
1014 | | - | |
| 1012 | + | |
1015 | 1013 | | |
1016 | 1014 | | |
1017 | | - | |
1018 | | - | |
| 1015 | + | |
1019 | 1016 | | |
1020 | 1017 | | |
1021 | 1018 | | |
| |||
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5870 | 5870 | | |
5871 | 5871 | | |
5872 | 5872 | | |
| 5873 | + | |
| 5874 | + | |
| 5875 | + | |
5873 | 5876 | | |
5874 | 5877 | | |
5875 | 5878 | | |
| |||
5913 | 5916 | | |
5914 | 5917 | | |
5915 | 5918 | | |
| 5919 | + | |
| 5920 | + | |
| 5921 | + | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
| 5925 | + | |
5916 | 5926 | | |
5917 | 5927 | | |
5918 | 5928 | | |
| |||
6038 | 6048 | | |
6039 | 6049 | | |
6040 | 6050 | | |
| 6051 | + | |
| 6052 | + | |
| 6053 | + | |
| 6054 | + | |
| 6055 | + | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
| 6064 | + | |
| 6065 | + | |
| 6066 | + | |
| 6067 | + | |
| 6068 | + | |
| 6069 | + | |
| 6070 | + | |
| 6071 | + | |
| 6072 | + | |
| 6073 | + | |
| 6074 | + | |
| 6075 | + | |
| 6076 | + | |
| 6077 | + | |
| 6078 | + | |
| 6079 | + | |
| 6080 | + | |
| 6081 | + | |
| 6082 | + | |
| 6083 | + | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
| 6099 | + | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
| 6142 | + | |
| 6143 | + | |
| 6144 | + | |
| 6145 | + | |
| 6146 | + | |
| 6147 | + | |
| 6148 | + | |
| 6149 | + | |
| 6150 | + | |
6041 | 6151 | | |
6042 | 6152 | | |
6043 | 6153 | | |
| |||
0 commit comments