Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rename
  • Loading branch information
ChenyuLInx committed Jun 29, 2023
commit bfec733e85a914e94e370fddf760e8f450275284
6 changes: 3 additions & 3 deletions core/dbt/events/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1228,13 +1228,13 @@ message UnsupportedConstraintMaterializationMsg {
}

// I069
message ParseNodeError{
message ParseInlineNodeError{
NodeInfo node_info = 1;
string exc = 2;
}
message ParseNodeErrorMsg {
message ParseInlineNodeErrorMsg {
EventInfo info = 1;
ParseNodeError data = 2;
ParseInlineNodeError data = 2;
}

// M - Deps generation
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ def message(self) -> str:
return line_wrap_message(warning_tag(msg))


class ParseNodeError(ErrorLevel):
class ParseInlineNodeError(ErrorLevel):
def code(self):
return "I069"

Expand Down
894 changes: 447 additions & 447 deletions core/dbt/events/types_pb2.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/dbt/task/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dbt.contracts.results import RunStatus, RunResult
from dbt.events.base_types import EventLevel
from dbt.events.functions import fire_event
from dbt.events.types import CompiledNode, Note, ParseNodeError
from dbt.events.types import CompiledNode, Note, ParseInlineNodeError
from dbt.exceptions import (
CompilationError,
DbtInternalError,
Expand Down Expand Up @@ -144,7 +144,7 @@ def _runtime_initialize(self):
self._inline_node_id = sql_node.unique_id
except CompilationError as exc:
fire_event(
ParseNodeError(
ParseInlineNodeError(
exc=str(exc.msg),
node_info={
"node_path": "sql/inline_query",
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/show/test_show.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from dbt.exceptions import DbtRuntimeError
from dbt.exceptions import DbtRuntimeError, Exception as DbtException
from dbt.tests.util import run_dbt_and_capture, run_dbt
from tests.functional.show.fixtures import (
models__second_ephemeral_model,
Expand Down Expand Up @@ -73,9 +73,7 @@ def test_inline_pass(self, project):

def test_inline_fail(self, project):
run_dbt(["build"])
with pytest.raises(
DbtRuntimeError, match="depends on a node named 'third_model' which was not found"
):
with pytest.raises(DbtException, match="Error parsing inline query"):
run_dbt(["show", "--inline", "select * from {{ ref('third_model') }}"])

def test_ephemeral_model(self, project):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def test_event_codes(self):
ref_model_latest_version="",
),
types.UnsupportedConstraintMaterialization(materialized=""),
types.ParseNodeError(exc=""),
types.ParseInlineNodeError(exc=""),
# M - Deps generation ======================
types.GitSparseCheckoutSubdirectory(subdir=""),
types.GitProgressCheckoutRevision(revision=""),
Expand Down