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

String to int conversion issue when config is loaded into the Dagit Launchpad #8123

Closed
dagsir bot opened this issue May 31, 2022 · 6 comments
Closed
Labels
area: UI/UX Related to User Interface and User Experience

Comments

@dagsir
Copy link

dagsir bot commented May 31, 2022

Issue from the Dagster Slack

This issue was generated from the slack conversation at: https://dagster.slack.com/archives/C01U954MEER/p1653825757813719?thread_ts=1653825757.813719&cid=C01U954MEER


Conversation excerpt

U02PY9R25PT: Hey - we ran into one of the weirdest bugs I’ve seen in PyYAML (yaml/pyyaml#98) as part of Dagster run config. We have a resource with a field configured to be a string (using str annotation or a Field(String) as well), and a string value starting with zero.
When running Dagit, the string is being converted to integer.
For example, using value “0345” lead to:
Invalid scalar at path root:resources:x. Value "345" of type "<class 'int'>" is not valid for expected type "String".
Thanks
U01J51Y6B9D: hi <@U02PY9R25PT>, thanks for the report! Just to nail down exactly what's happening, where is your run config originally defined in this case? Do you have a dictionary in your python code which is then being modified in the Launchpad view in Dagit, or is the config being defined directly/entirely in Dagit?
U02PY9R25PT: Hi <@U01J51Y6B9D>, thanks for the response. We have a Python dict , related to a resource (with config schema definition as part of the resource) appropriately loaded into the job config (as part of the JobDefinition). Scheduling that job works great without any issues.
When we’re going to Dagit and clicking on the job’s run launcher tab, it’s being converted to YAML in the background (I suppose), and then we get the error I wrote about.
U01J51Y6B9D: <@U018K0G2Y85> issue String to int conversion issue when config is loaded into the Dagit Launchpad
U018K0G2Y85: Created issue at: #8122


Message from the maintainers:

Do you care about this too? Give it a 👍. We factor engagement into prioritization.

@OwenKephart
Copy link
Contributor

This seems to happen when existing (properly-typed) config is loaded into the Launchpad view in Dagit. Probably an issue exclusive to our Dagit YAML parsing.

@alangenfeld
Copy link
Member

related #5962

i believe we need to switch over to just sending the yaml str instead of converting to json

@hellendag
Copy link
Member

This should be fixed with #8443.

@johannkm
Copy link
Contributor

Closed by #8443

@gibsondan gibsondan reopened this Jun 24, 2022
@gibsondan
Copy link
Member

Not actually fixed since in the case where job config is specified a dictionary - we still run into the underlying pyyaml issue from the OP

@gibsondan
Copy link
Member

Should now be fixed for real with #8621

@yuhan yuhan added area: UI/UX Related to User Interface and User Experience and removed dagit labels Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UI/UX Related to User Interface and User Experience
Projects
None yet
Development

No branches or pull requests

6 participants