-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix asset check selection for required asset checks (#24781)
This is a stopgap measure. This solution would cause undesired behavior in some edge cases where users are automating asset checks separately from their associated asset (essentially, the check would double-fire in some circumstances. NOCHANGELOG - [ ] `NEW` _(added new feature or capability)_ - [ ] `BUGFIX` _(fixed a bug)_ - [ ] `DOCS` _(added or updated documentation)_
- Loading branch information
1 parent
c91ee94
commit c4bbfb4
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
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
17 changes: 17 additions & 0 deletions
17
...ions_tests/declarative_automation_tests/daemon_tests/definitions/check_not_subsettable.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import dagster as dg | ||
from dagster._core.definitions.asset_check_spec import AssetCheckSpec | ||
|
||
any_dep_newly_updated = dg.AutomationCondition.any_deps_match( | ||
dg.AutomationCondition.newly_updated() | dg.AutomationCondition.will_be_requested() | ||
) | ||
|
||
|
||
@dg.asset( | ||
check_specs=[AssetCheckSpec(asset="asset_w_check", name="row_count")], | ||
automation_condition=dg.AutomationCondition.eager(), | ||
) | ||
def asset_w_check() -> dg.MaterializeResult: | ||
return dg.MaterializeResult(check_results=[dg.AssetCheckResult(passed=True)]) | ||
|
||
|
||
defs = dg.Definitions(assets=[asset_w_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