[pac] add AssetCheckState#33243
Merged
Merged
Conversation
This was referenced Jan 12, 2026
Contributor
Author
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 14, 2026 00:29
323aaa3 to
c752369
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 14, 2026 00:29
7c3dabb to
04a0928
Compare
This was referenced Jan 14, 2026
Merged
Merged
Merged
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 14, 2026 19:44
04a0928 to
2d22edf
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
2 times, most recently
from
January 14, 2026 21:10
35d9920 to
fc68c31
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 14, 2026 21:10
2d22edf to
a46ebcd
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 14, 2026 21:45
fc68c31 to
e438462
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 14, 2026 21:45
a46ebcd to
41c2116
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 14, 2026 23:04
e438462 to
fccb6fe
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
2 times, most recently
from
January 16, 2026 00:42
8924e96 to
31a51b3
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
2 times, most recently
from
January 16, 2026 00:43
94fb89a to
b01a20b
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 16, 2026 00:43
31a51b3 to
3fd86b4
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 16, 2026 01:03
b01a20b to
4a49aff
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 16, 2026 01:03
3fd86b4 to
18cc9f0
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 16, 2026 01:15
4a49aff to
7577749
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 16, 2026 01:15
18cc9f0 to
2a99818
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 16, 2026 20:41
2a99818 to
e9e1b75
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 16, 2026 20:41
7577749 to
243e63c
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 20, 2026 23:44
b2d651b to
b6a9634
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 20, 2026 23:44
f645bf8 to
58cd914
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 21, 2026 00:01
b6a9634 to
3c493b4
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 21, 2026 00:01
58cd914 to
137c25d
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 22, 2026 00:11
3c493b4 to
d3eef70
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 22, 2026 00:11
137c25d to
8a6b75f
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 22, 2026 03:20
8a6b75f to
a9ee90b
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
2 times, most recently
from
January 22, 2026 21:25
f2824da to
ca729a6
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 22, 2026 21:25
a9ee90b to
707bd1b
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 22, 2026 23:16
707bd1b to
888c311
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
2 times, most recently
from
January 23, 2026 00:46
4271885 to
bdf1795
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 23, 2026 00:46
888c311 to
1bd7f5d
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_get_asset_check_partitions_storage_method
branch
from
January 26, 2026 18:26
1bd7f5d to
e4f8832
Compare
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 26, 2026 18:26
bdf1795 to
b541011
Compare
gibsondan
approved these changes
Jan 26, 2026
Comment on lines
+118
to
+132
| # do a bulk fetch for runs across all states | ||
| finished_runs = ( | ||
| instance.get_runs( | ||
| filters=RunsFilter(run_ids=list(run_ids_to_fetch), statuses=FINISHED_STATUSES) | ||
| ) | ||
| if len(run_ids_to_fetch) > 0 | ||
| else [] | ||
| ) | ||
| finished_runs_status_by_id = {run.run_id: run.status for run in finished_runs} | ||
| return { | ||
| key: initial_states[key].with_updates( | ||
| key, partitions_defs_by_key[key], infos_by_key[key], finished_runs_status_by_id | ||
| ) | ||
| for key in check_keys | ||
| } |
There was a problem hiding this comment.
how about the dreaded run deletion mid-execution case?
Contributor
Author
Merge activity
|
OwenKephart
changed the base branch from
01-09-_pac_add_get_asset_check_partitions_storage_method
to
graphite-base/33243
January 26, 2026 21:18
OwenKephart
force-pushed
the
01-09-_pac_add_assetcheckstatuscachevalue
branch
from
January 26, 2026 21:20
b541011 to
a5cd5b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary & Motivation
This adds in a new caching object that incrementally calculates the state across all partitions of a check.
The state transition logic here is fairly complex because the underlying reality of asset check status is itself very complex! In particular, we need information about both the asset check execution itself, as well as any materializations that target the relevant asset.
We have a reasonably extensive suite of tests in a downstack PR that this is validated against.
Note that this PR does NOT actually improve performance because we do not incrementally cache the state anywhere at this point in time. This purely rebuilds from scratch every single time we fetch this. This PR is purely for demonstrating that the state transition logic is correct, and an upstack PR will add database methods for storing incremental versions of this state.
We do a bit of a funky thing here in the storage layer, where we have a
get_stored_asset_check_stateas well as a regularget_asset_check_state.This setup allows us to:
get_asset_check_stateon SqlEventLogStorage to write the updated values back in place, but in other implementations we have the flexibility to have a completely separate process handle keeping the incremental value up to date, meaningget_asset_check_statewill not mutate the state of the instanceHow I Tested These Changes
Changelog
NOCHANGELOG