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
Allow json serialized strings to be passed in as run config to graphql calls #6071
Conversation
This pull request is being automatically deployed with Vercel (learn more). dagit-storybook – ./js_modules/dagit/packages/core🔍 Inspect: https://vercel.com/elementl/dagit-storybook/E7bZPXZ5cvu9WJBRQg6T5zB5mF1E [Deployment for e096ad5 canceled] dagster – ./docs/next🔍 Inspect: https://vercel.com/elementl/dagster/3ZZvcySRFKU9QTr5pK6G2ysbhAT1 [Deployment for e096ad5 canceled] |
4d92ae0
to
6a7f927
Compare
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.
I believe @smackesey was going to add support for uploading as yaml as well - if were going to be flexible on a single input arg vs having separate args for json, should this arg allow yaml as well?
except JSONDecodeError: | ||
return run_config |
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.
hmmm
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.
can we at least put this under test to ensure the error is reasonable. If its not might be better to throw here that it was a string and not parseable
I'd be fine with that. Did you have an idea in mind for how the backend would distinguish between whether it's JSON or YAML? (Attempting to parse it in each format is of course one option) |
Since we are already doing the try parse except shenanigans, seems fitting. Doesn't need to be in this PR, just seemed like a good place to discuss it since we are adding flexibility to the arg. |
except JSONDecodeError: | ||
return run_config |
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.
can we at least put this under test to ensure the error is reasonable. If its not might be better to throw here that it was a string and not parseable
6a7f927
to
589ef6b
Compare
…l calls Summary: In some languages / graphql clients it is a pain to set up a scalar that is a JSON object, and it's easier for clients to serialize up the run config as a string and upload that (even if it ends up double-encoded since the transport is also JSON-encoded). This PR adds that as an option.
589ef6b
to
e096ad5
Compare
Summary:
In some languages / graphql clients it is a pain to set up a scalar that is a JSON object, and it's easier for clients to serialize up the run config as a string and upload that (even if it ends up double-encoded since the transport is also JSON-encoded).
This PR adds that as an option.
Summary
Test Plan
Checklist