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

[BACKPORT] finish message rename in types.proto (#6594) #6596

Merged
merged 2 commits into from
Jan 13, 2023
Merged
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
4 changes: 2 additions & 2 deletions core/dbt/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dbt.config.renderer import DbtProjectYamlRenderer, ProfileRenderer
from dbt.events.functions import fire_event
from dbt.events.types import InvalidOptionYAML
from dbt.exceptions import DbtValidationError, OptionNotYamlDict
from dbt.exceptions import DbtValidationError, OptionNotYamlDictError


def parse_cli_vars(var_string: str) -> Dict[str, Any]:
Expand All @@ -23,7 +23,7 @@ def parse_cli_yaml_string(var_string: str, cli_option_name: str) -> Dict[str, An
if var_type is dict:
return cli_vars
else:
raise OptionNotYamlDict(var_type, cli_option_name)
raise OptionNotYamlDictError(var_type, cli_option_name)
except DbtValidationError:
fire_event(InvalidOptionYAML(option_name=cli_option_name))
raise
Expand Down
4 changes: 3 additions & 1 deletion core/dbt/events/proto_types.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions core/dbt/events/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ message MissingProfileTargetMsg {
// Skipped A006, A007

// A008
message InvalidVarsYAML {
message InvalidOptionYAML {
string option_name = 1;
}

message InvalidVarsYAMLMsg {
message InvalidOptionYAMLMsg {
EventInfo info = 1;
InvalidVarsYAML data = 2;
InvalidOptionYAML data = 2;
}

// A009
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ def get_message(self) -> str:
return msg


class OptionNotYamlDict(CompilationError):
class OptionNotYamlDictError(CompilationError):
def __init__(self, var_type, option_name):
self.var_type = var_type
self.option_name = option_name
Expand Down