-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Run Timeline] Don't drop job data if locations within the FutureTick…
…sQuery fails (#27944) ## Summary & Motivation Currently, if the FutureTicksQuery itself fails we recover by returning the ongoing runs and complete runs data that we have. However, if the query doesn't fail then we end up iterating over all of the locations within it and constructing a `jobs` array with all of the rows of the timeline. The problem is that this construction relies on the jobs returned by FutureTicksQuery. If FutureTicksQuery doesn't return a particular job then we drop the data for that job completely. To fix this track which keys we've added via the FutureTicksQuery and then do a second pass where we add data for any jobs that were not in the FutureTicksQuery ## How I Tested These Changes Loaded the Run timeline for a customer with a failing location entry ## Changelog > Insert changelog entry or delete this section.
- Loading branch information
Showing
84 changed files
with
1,104 additions
and
1,725 deletions.
There are no files selected for viewing
Binary file modified
BIN
+227 KB
(250%)
.../images/guides/build/projects-and-components/components/component-type-docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
21 changes: 8 additions & 13 deletions
21
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/asset_with_check.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
import pandas as pd | ||
|
||
from dagster import ( | ||
AssetCheckResult, | ||
AssetCheckSpec, | ||
AssetExecutionContext, | ||
Definitions, | ||
Output, | ||
asset, | ||
) | ||
import dagster as dg | ||
|
||
|
||
@asset(check_specs=[AssetCheckSpec(name="orders_id_has_no_nulls", asset="orders")]) | ||
def orders(context: AssetExecutionContext): | ||
@dg.asset( | ||
check_specs=[dg.AssetCheckSpec(name="orders_id_has_no_nulls", asset="orders")] | ||
) | ||
def orders(context: dg.AssetExecutionContext): | ||
orders_df = pd.DataFrame({"order_id": [1, 2], "item_id": [432, 878]}) | ||
|
||
# save the output and indicate that it's been saved | ||
orders_df.to_csv("orders") | ||
yield Output(value=None) | ||
yield dg.Output(value=None) | ||
|
||
# check it | ||
num_null_order_ids = orders_df["order_id"].isna().sum() | ||
yield AssetCheckResult( | ||
yield dg.AssetCheckResult( | ||
passed=bool(num_null_order_ids == 0), | ||
) | ||
|
||
|
||
defs = Definitions(assets=[orders]) | ||
defs = dg.Definitions(assets=[orders]) |
28 changes: 12 additions & 16 deletions
28
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/factory.py
This file contains 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
33 changes: 14 additions & 19 deletions
33
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/jobs.py
This file contains 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
15 changes: 5 additions & 10 deletions
15
..._snippets/docs_snippets/concepts/assets/asset_checks/materializable_freshness_complete.py
This file contains 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
22 changes: 8 additions & 14 deletions
22
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/multi_asset_check.py
This file contains 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
20 changes: 8 additions & 12 deletions
20
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/severity.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
from dagster import ( | ||
AssetCheckResult, | ||
AssetCheckSeverity, | ||
Definitions, | ||
asset, | ||
asset_check, | ||
) | ||
import dagster as dg | ||
|
||
|
||
@asset | ||
@dg.asset | ||
def my_asset(): ... | ||
|
||
|
||
@asset_check(asset=my_asset) | ||
@dg.asset_check(asset=my_asset) | ||
def my_check(): | ||
is_serious = ... | ||
return AssetCheckResult( | ||
return dg.AssetCheckResult( | ||
passed=False, | ||
severity=AssetCheckSeverity.ERROR if is_serious else AssetCheckSeverity.WARN, | ||
severity=dg.AssetCheckSeverity.ERROR | ||
if is_serious | ||
else dg.AssetCheckSeverity.WARN, | ||
) | ||
|
||
|
||
defs = Definitions(assets=[my_asset], asset_checks=[my_check]) | ||
defs = dg.Definitions(assets=[my_asset], asset_checks=[my_check]) |
This file contains 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
This file contains 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
Oops, something went wrong.