What's the issue?
Dagster Configs will accept keyword arguments that are not present in the schema. The provided keywords are then not accessible inside of an op or asset (unlike in a PermissiveConfig).
What did you expect to happen?
Regular Configs should raise an error if a keyword arg not in the schema is provided in construction.
How to reproduce?
The following code succeeds:
from dagster import Config, RunConfig, asset, job, materialize, op
class MyOpConfig(Config):
person_name: str
@op
def print_greeting(config: MyOpConfig):
print(f"hello {config.person_name}")
@job
def greeting_job():
print_greeting()
class MyAssetConfig(Config):
person_name: str
@asset
def greeting(config: MyAssetConfig) -> str:
return f"hello {config.person_name}"
op_result = greeting_job.execute_in_process(
run_config=RunConfig(
{"print_greeting": MyOpConfig(person_name="Alice", nonexistent_config_value=1)}
),
)
asset_result = materialize(
[greeting],
run_config=RunConfig(
{"greeting": MyAssetConfig(person_name="Alice", nonexistent_config_value=1)}
),
)
Despite indication in the documentation that it should fail.
Dagster version
dagster, version 1.10.19
Deployment type
None
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
What's the issue?
Dagster Configs will accept keyword arguments that are not present in the schema. The provided keywords are then not accessible inside of an op or asset (unlike in a PermissiveConfig).
What did you expect to happen?
Regular Configs should raise an error if a keyword arg not in the schema is provided in construction.
How to reproduce?
The following code succeeds:
Despite indication in the documentation that it should fail.
Dagster version
dagster, version 1.10.19
Deployment type
None
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.