Skip to content

Commit

Permalink
Merge branch 'main' into snowplow-tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare authored Sep 21, 2024
2 parents c0ef010 + 7e2edee commit cfb9e5e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240709-190235.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Do not cast unscrubbed values to a string
time: 2024-07-09T19:02:35.755277-06:00
custom:
Author: dbeatty10
Issue: "165"
2 changes: 1 addition & 1 deletion dbt_common/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.8.0"
version = "1.9.0"
6 changes: 3 additions & 3 deletions dbt_common/exceptions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def env_secrets() -> List[str]:
return [v for k, v in os.environ.items() if k.startswith(SECRET_ENV_PREFIX) and v.strip()]


def scrub_secrets(msg: str, secrets: List[str]) -> str:
def scrub_secrets(msg: Any, secrets: List[str]) -> Any:
scrubbed = str(msg)

for secret in secrets:
scrubbed = scrubbed.replace(secret, "*****")

return scrubbed
return msg if str(msg) == scrubbed else scrubbed


class DbtBaseException(Exception):
Expand Down Expand Up @@ -240,7 +240,7 @@ def process_stack(self) -> List[str]:
lines = []

if hasattr(self.node, "build_path") and self.node.build_path:
lines.append(f"compiled Code at {self.node.build_path}")
lines.append(f"compiled code at {self.node.build_path}")

return lines + DbtRuntimeError.process_stack(self)

Expand Down

0 comments on commit cfb9e5e

Please sign in to comment.