Skip to content

Commit

Permalink
vdk-core: ingest logging formatting bug
Browse files Browse the repository at this point in the history
The logs were not replacing the method name because the f-string was
missing the `f"` so this is fixed.

Slightly simplified the error message to make it easier to understand I
hope

Signed-off-by: Antoni Ivanov <[email protected]>
  • Loading branch information
antoniivanov committed Oct 26, 2023
1 parent 85bffc0 commit d176311
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ def __get_ingester(self, method: str) -> IngesterBase:
else:
errors.report_and_throw(
VdkConfigurationError(
"Provided method, {method}, has invalid value.",
"VDK was run with method={method}, however {method} is not part of the available ingestion mechanisms.",
errors.MSG_CONSEQUENCE_DELEGATING_TO_CALLER__LIKELY_EXECUTION_FAILURE,
f"Provided method, {method}, has invalid value."
f"VDK was run with method={method}, however {method} is not part of the available ingestion methods."
f"Provide either valid value for method, or install ingestion plugin that supports this type. "
f"Currently possible values are {list(self._ingester_builders.keys())}",
f"Currently possible values are {list(self._ingester_builders.keys())}"
)
)

Expand Down Expand Up @@ -219,16 +218,9 @@ def __initialize_processor(self, method) -> Optional[IIngesterPlugin]:
if processor_plugin is None:
errors.report_and_throw(
VdkConfigurationError(
"Could not create new processor plugin of type" f" {method}.",
f"VDK was run with method={method}, however "
"no valid ingestion processor plugin was "
"created.",
errors.MSG_CONSEQUENCE_DELEGATING_TO_CALLER__LIKELY_EXECUTION_FAILURE,
"Seems to be a bug in the plugin for method"
f" {method}. Make sure it's correctly "
f"installed. If upgraded recently, consider"
" reverting to previous version. Or use "
"another method type.",
"Could not create new processor plugin of method: " f" {method}.",
f"Currently possible processor methods are {list(self._ingester_builders.keys())}. "
"Make sure the processing configuration value are correct and the plugin is installed. ",
)
)
return processor_plugin
Expand Down

0 comments on commit d176311

Please sign in to comment.