-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Defined dict with malformed result from fromyaml()
passed into log()
crashes dbt
#3464
Comments
log()
crashes dbtfromyaml()
passed into log()
crashes dbt
Thanks for opening @barberscott! I managed an even simpler reproduction case. Create and save a model file containing just: {{ log(none['foo']) }} In response to a
With the same stacktrace:
Interestingly, this:
The error is cropping up when trying to create a Jinja2 Undefined object: That's as far as I've gotten. Worthy of further investigation for sure. |
We use a special JSON encoder for json-rpc requests. The response data is serialized to a JSON string here: Which uses this custom JSON Encoder: This json encoder calls So the JSON serializer just repeatedly calls Example:
So - the fix here is either to:
Might be other options too - open to suggestions :) |
* (#3464) Serialize Undefined values to JSON for rpc requests * Update changelog, fix typo
* (#3464) Serialize Undefined values to JSON for rpc requests * Update changelog, fix typo
Describe the bug
dbt crashes attempting to compile when I inadvertently call
log()
with a non-string - this in turn leads the RPC server to not report an error and, in dbt Cloud, manifests as an infinite spinning compiling status.Steps To Reproduce
Case 1: Create a model file with (only):
in the dbt Cloud IDE and save.
Expected behavior
Expect dbt not to crash.
The output of
dbt --version
:The text was updated successfully, but these errors were encountered: