-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[pythonic resources] never treat partial resources as resolved #27210
[pythonic resources] never treat partial resources as resolved #27210
Conversation
6c37b38
to
e19c5ee
Compare
@@ -965,3 +965,64 @@ def my_asset(outer: MyBoringOuterResource) -> str: | |||
"my_asset", | |||
"SetupTeardownInnerResource yield_for_execution done", | |||
] | |||
|
|||
|
|||
def test_nested_resources_runtime_config_fully_populated() -> None: |
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.
describe test case in docstring pls
class CredentialsResource(ConfigurableResource): | ||
username: str = "default_username" | ||
password: str = "default_password" | ||
|
||
class DBConfigResource(ConfigurableResource): | ||
creds: CredentialsResource | ||
host: str = "default_host" | ||
database: str = "default_database" | ||
|
||
class DBResource(ConfigurableResource): | ||
config: DBConfigResource |
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.
nit: I think it would be a bit more clear to make the names reference what we're testing (IE top level resource, nested resource, further nested resource etc
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.
Noice. thanks
e19c5ee
to
ef85376
Compare
Deploy preview for dagster-university ready! ✅ Preview Built with commit ef85376. |
Summary
The implementation of
_is_fully_configured
previously would mark partial/configure-at-runtime resources as fully populated if all values had defaults. This means the config values couldn't be overridden at runtime properly.This PR ensures that partial/configure-at-runtime resources can always have fields overridden at runtime.
Test Plan
Previously failing unit test.