forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test demonstrating that we do not hit the RESOURCE_EXHAUSTED erro…
…r above a given threshold (dagster-io#25214) ## Summary & Motivation As title. This sets a baseline for feeling "safe" with this many assets. Some upgrades were needed to the test suite to make it more realistic such that we could trip the error. Future changes will allow us to greatly increase, or entirely remove, this limit. ## How I Tested These Changes Confirmed that if 1000 assets were supplied, we would fail this test. ## Changelog > Insert changelog entry or delete this section.
- Loading branch information
1 parent
5646577
commit f4e2cf8
Showing
4 changed files
with
135 additions
and
23 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
35 changes: 35 additions & 0 deletions
35
...finitions_tests/declarative_automation_tests/daemon_tests/definitions/500_eager_assets.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,35 @@ | ||
from dagster import ( | ||
AutomationCondition, | ||
AutomationConditionSensorDefinition, | ||
DailyPartitionsDefinition, | ||
Definitions, | ||
HourlyPartitionsDefinition, | ||
) | ||
from dagster_test.toys.auto_materializing.large_graph import AssetLayerConfig, build_assets | ||
|
||
|
||
def get_defs(n: int) -> Definitions: | ||
hourly_partitions_def = HourlyPartitionsDefinition("2020-01-01-00:00") | ||
daily_partitions_def = DailyPartitionsDefinition("2020-01-01") | ||
unit = n // 10 | ||
assets = build_assets( | ||
id="perf_test", | ||
layer_configs=[ | ||
AssetLayerConfig(1 * unit, 0, hourly_partitions_def), | ||
AssetLayerConfig(2 * unit, 2, hourly_partitions_def), | ||
AssetLayerConfig(2 * unit, 4, hourly_partitions_def), | ||
AssetLayerConfig(2 * unit, 4, daily_partitions_def), | ||
AssetLayerConfig(2 * unit, 2, daily_partitions_def), | ||
AssetLayerConfig(1 * unit, 2, daily_partitions_def), | ||
], | ||
automation_condition=AutomationCondition.eager(), | ||
) | ||
return Definitions( | ||
assets=assets, | ||
sensors=[ | ||
AutomationConditionSensorDefinition("the_sensor", asset_selection="*", user_code=True) | ||
], | ||
) | ||
|
||
|
||
defs = get_defs(500) |
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