-
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-1983] [Feature] Log the meta-dictionary instead of stringifying #6803
Comments
cc @gshank - relevant to forthcoming tech debt ticket about needing to stringify values in proto dictionaries |
@jtcohen6 I'm curious why it's necessary to stringify the values? I've tested it locally and with a functional test in the PR and it seems like logging works without stringifying. |
We need to coordinate the event payload within the contract defined by the associated proto(col buffer) schema: dbt-core/core/dbt/events/types.proto Line 38 in d2f3cdd
dbt-core/core/dbt/events/proto_types.py Lines 50 to 52 in d2f3cdd
|
How do you tell if the payload is violating a contract? Is it manual or is there a test? (all the tests passed on my PR #6804) What happens if the contract is violated? (since all the tests pass, nothing immediately breaks) Could this be a place where it's worth letting the contract disagree with the implementation? |
@tmastny You're asking all the right questions! :) We planned to add that testing when we actually added first-class support for binary logging, which would require validating the proto serialization of every event. We've delayed that work for now. In the meantime, we should still have automated testing that validates the proto schema/serialization of every event: |
Next steps here would be:
Or, if that's not possible:
|
Closing as a duplicate of #6832, to keep the implementation conversation centralized over there |
Is this your first time submitting a feature request?
Describe the feature
With the current release the
meta
field innode_info
is stringified before logging: b45de95.The means that that configs written like this:
are logged like this:
This makes it significantly harder to work with
meta
fields that have nested elements or arrays.I propose we stop stringifying the
meta
field and log it as. Here's a PR with the change: #6804Describe alternatives you've considered
The alternative is to parse the strings in the logging systems that consume it.
In the original PR, there was some concern about logging without stringifying, but I've tested it (manually and with a functional test) and it works.
Who will this benefit?
Users who want to use the
meta
field in their logging systems."meta": {"owners": ["team1", "team2"]}
"["team1", "team2"]"
.Are you interested in contributing this feature?
Yes, here is a PR: #6804.
Anything else?
No response
The text was updated successfully, but these errors were encountered: