-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Batch fetching latest asset check executions #17650
Batch fetching latest asset check executions #17650
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
@@ -138,3 +149,113 @@ def get_checks_for_asset( | |||
) | |||
|
|||
return self._checks[asset_key] | |||
|
|||
|
|||
def _execution_targets_latest_materialization( |
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.
moved over from fetch_asset_checks.py
1f36e09
to
be4d6f7
Compare
869b085
to
efa6d08
Compare
be4d6f7
to
aeaa9cf
Compare
aeaa9cf
to
cdccbb8
Compare
): | ||
self._asset_check = asset_check | ||
self._can_execute_individually = can_execute_individually | ||
self._exeuction_loader = execution_loader |
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.
typo
self._exeuction_loader = execution_loader | |
self._execution_loader = execution_loader |
asset_graph = ExternalAssetGraph.from_workspace(self._context) | ||
if limit_per_asset: | ||
for asset_key, external_checks_for_asset in external_checks.items(): | ||
external_checks[asset_key] = external_checks_for_asset[:limit_per_asset] |
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.
external_checks
should be renamed external_checks_by_asset_key
. It is currently confusing to parse since we iterate on it multiple times.
external_checks[asset_key] = external_checks_for_asset[:limit_per_asset] | |
external_checks_by_asset_key[asset_key] = external_checks_for_asset[:limit_per_asset] |
cdccbb8
to
0c8c36b
Compare
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-nbfbpw3op-elementl.vercel.app Direct link to changed pages: |
Add a batch loader for the executionForLatestMaterialization resolver, which we call to display the asset graph. Uses the event log method
get_latest_asset_check_execution_by_key
instead of fetching each execution separately.There's still optimization to be done, e.g. we're still fetching the asset record once per check. I'll follow up with that in a separate diff.