Skip to content
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

Dagster RunConfig conversion to config dictionary fails if underlying Config has field called 'keys' #26415

Open
carterinvres opened this issue Dec 11, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@carterinvres
Copy link

What's the issue?

I was updating an existing schedule to use Dagster's RunConfig syntax when creating the RunRequest rather than an {"ops": ...} dictionary and during the automatic conversion of the RunConfig to a config dictionary, Dagster would throw "'list' object is not callable" errors which was quite confusing.

The underlying config object was roughly equivalent to

AConfig(Config)
keys: list[str]

Changing the field name from "keys" to basically anything else resolved the issue and had Dagster correctly yielding the RunRequests with no other changes.

What did you expect to happen?

I expected that the schedule would be able to correctly convert a valid RunConfig object regardless of whether one of the underlying Config objects has a field called 'keys'. Alternatively, error handling providing a more descriptive message than 'list' object is not callable would also have been a good outcome.

How to reproduce?

from dagster import (
schedule,
RunRequest,
ScheduleEvaluationContext,
RunConfig,
job,
op,
Config,
)

class BasicConfig(Config):
keys: list[str]

@op
def basic_op(config: BasicConfig):
print(config.keys)

@job
def basic_job():
basic_op()

@schedule(
job=basic_job,
cron_schedule="00 17 * * *",
execution_timezone="America/Toronto",
name="aum_schedule",
)
def basic_schedule(context: ScheduleEvaluationContext):
run_config = RunConfig(ops={"basic_op": BasicConfig(keys=[])})
return RunRequest(run_key="", run_config=run_config)

Running this schedule will raise the error mentioned above.

Dagster version

1.9.3

Deployment type

None

Deployment details

Should not be relevant, even running using build_schedule_context() in a local pass is enough to invoke.

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.

@carterinvres carterinvres added the type: bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant