-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-2829] [Bug] dbt core doesn't always provide JSON logs in jobs when requested by Cloud #8123
Comments
Thank you for reporting this @sophiad96 ! ReprexIt is pretty easy to reproduce this on dbt-core 1.4: dbt ls --vars ‘{"foo":"'bar'"} ❌ dbt-core 1.4 gives a long stack trace like this:
✅ Using dbt-core >=1.5.2, there is no stack trace (which I think means this problem is avoided):
Next steps@jtcohen6 #7735 solves this and was already backported to 1.5 in #7878 -- do you want to backport it any further back? |
Thanks @dbeatty10! Important context here is that these logs are being produced with I think this will be trickier to backport to |
Specifically, the issue here is that CLI validation (both argparse for v1.4 + click for v1.5+) returns text to stdout, not JSON. So trying to parse from stdout as JSON would lead to an error. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
…#5660) [Preview](https://docs-getdbt-com-git-dbeatty10-patch-2-dbt-labs.vercel.app/docs/dbt-versions/core-upgrade/upgrading-to-v1.5#behavior-changes) ## What are you changing in this pull request and why? In v1.5, we changed the CLI internals from [`argparse` to `click`](dbt-labs/dbt-core#8123 (comment)). Since this marked an important change that affected some behavior, it would be helpful to document that this change took place in v1.5. ## Checklist - [x] Review the [Content style guide](https:/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. --------- Co-authored-by: Matt Shaver <[email protected]>
Is this a new bug in dbt-core?
Current Behavior
An Enterprise customer had a job erroring out due to a missing quotation at the end of a vars statement:
dbt run -m stg_action_defs_from_couchbase --vars ‘{"ctm_odate": "2023-07-11", "ctm_jobname": "JBCPER105221-CMBSJ", "v_flow_nm":"'HEQ_ELIG_AGG'"}
Instead of returning a clear error message to indicate that the missing single quotation at the end is the problem, the job errored out and dbt didn’t display any obvious error logs.
Expected Behavior
The error message found in Datadog should be displayed in the job logs in the UI.
Steps To Reproduce
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
https://dbtlabs.atlassian.net/browse/TRIAGE-549
The text was updated successfully, but these errors were encountered: