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

Replace stringified meta field with the actual meta field. #6804

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions core/dbt/contracts/graph/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
from dbt.events.contextvars import set_contextvars
from dbt import flags
from dbt.node_types import ModelLanguage, NodeType
from dbt.utils import cast_dict_to_dict_of_strings


from .model_config import (
NodeConfig,
Expand Down Expand Up @@ -207,8 +205,6 @@ class NodeInfoMixin:

@property
def node_info(self):
meta = getattr(self, "meta", {})
meta_stringified = cast_dict_to_dict_of_strings(meta)
node_info = {
"node_path": getattr(self, "path", None),
"node_name": getattr(self, "name", None),
Expand All @@ -218,7 +214,7 @@ def node_info(self):
"node_status": str(self._event_status.get("node_status")),
"node_started_at": self._event_status.get("started_at"),
"node_finished_at": self._event_status.get("finished_at"),
"meta": meta_stringified,
"meta": getattr(self, "meta", {}),
}
node_info_msg = NodeInfo(**node_info)
return node_info_msg
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/logging/test_meta_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ def test_meta(project, logs_dir):
if node_path == "model1.sql":
assert node_info["meta"] == {}
elif node_path == "model2.sql":
assert node_info["meta"] == {"owners": "['team1', 'team2']"}
assert node_info["meta"] == {"owners": ["team1", "team2"]}
elif node_path == "model3.sql":
assert node_info["meta"] == {"key": "1"}
assert node_info["meta"] == {"key": 1}