internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: dbt-labs/dbt-core

Issue:
[CT-2804] Exclude `click==8.1.4` from dependencies
## Problem
When `click==8.1.4` was released, our code quality workflows using `mypy` began failing. An issue has been created on the [click repository](https://github.com/pallets/click/issues/2558). 

## Solution
The solution is to exclude, for the time being, `click==8.1.4`. Currently our click dependency is set to `click>=7.0,<9.0`, this should become on main `click>=8.1.1,<8.1.4`.

## Backports
We need to backport this fix to `1.3.latest`, `1.4.latest`, and `1.5.latest`. For the backports we should update the dependency from `click>=7.0,<9.0` to `click>=7.0,<8.1.4`. The reason for the different specification in the backports is that we already support `click 7.x` in these earlier versions. Dropping support for `click 7.x` could be problematic if people are installing dbt-core alongside other dependencies which limit click to `7.x.`, then dropping support for `click 7.x` would represent a breaking change (and we shouldn't do this in a patch version).



Discussion:

Resolving patch:
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -59,7 +59,8 @@
         # ----
         # dbt-core uses these packages in standard ways. Pin to the major version, and check compatibility
         # with major versions in each new minor version of dbt-core.
-        "click>=7.0,<9",
+        # temporarily pinning click for mypy failures: https://github.com/pallets/click/issues/2558
+        "click>=8.1.1,<8.1.4",
         "networkx>=2.3,<4",
         # ----
         # These packages are major-version-0. Keep upper bounds on upcoming minor versions (which could have breaking changes)


Test patch:
Repository: dbt-labs/dbt-core

Issue:
pin click
resolves #8048 

### Description

Pin main to `click>=8.1.1,<8.1.4`

### Checklist

- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements)
- [ ] I have run this code in development and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [ ] I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR
- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)



Discussion:
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).

Resolving patch:
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -48,7 +48,8 @@
     install_requires=[
         "Jinja2==3.1.2",
         "agate>=1.6,<1.7.1",
-        "click>=7.0,<9",
+        # temporarily pinning click for mypy failures: https://github.com/pallets/click/issues/2558
+        "click>=7.0,<8.1.4",
         "colorama>=0.3.9,<0.4.7",
         "hologram>=0.0.14,<=0.0.16",
         "isodate>=0.6,<0.7",


Test patch:
Repository: dbt-labs/dbt-core

Issue:
pin click
resolves #8048 

### Description

Pin main to `click>=8.1.1,<8.1.4`

### Checklist

- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements)
- [ ] I have run this code in development and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [ ] I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR
- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)



Discussion:
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).

Resolving patch:
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -49,7 +49,8 @@
         "Jinja2==3.1.2",
         "agate>=1.6,<1.7.1",
         "betterproto==1.2.5",
-        "click>=7.0,<9",
+        # temporarily pinning click for mypy failures: https://github.com/pallets/click/issues/2558
+        "click>=7.0,<8.1.4",
         "colorama>=0.3.9,<0.4.7",
         "hologram>=0.0.14,<=0.0.16",
         "isodate>=0.6,<0.7",


Test patch:
Repository: dbt-labs/dbt-core

Issue:
pin click
resolves #8048 

### Description

Pin main to `click>=8.1.1,<8.1.4`

### Checklist

- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements)
- [ ] I have run this code in development and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [ ] I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR
- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)



Discussion:
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).

Resolving patch:
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -48,7 +48,8 @@
     install_requires=[
         "Jinja2==3.1.2",
         "agate>=1.6,<1.6.4",
-        "click>=7.0,<9",
+        # temporarily pinning click for mypy failures: https://github.com/pallets/click/issues/2558
+        "click>=7.0,<8.1.4",
         "colorama>=0.3.9,<0.4.6",
         "hologram>=0.0.14,<=0.0.15",
         "isodate>=0.6,<0.7",


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2812] Remove `create_metric` property from end user facing `Measure` spec
## Acceptance Criteria

- [create_metric property](https://github.com/dbt-labs/dbt-core/blob/15ef88d2ed36fd8bb6aad26325ee11789ff02ffe/core/dbt/contracts/graph/unparsed.py#L700) is removed from the [UnparsedMeasure](https://github.com/dbt-labs/dbt-core/blob/15ef88d2ed36fd8bb6aad26325ee11789ff02ffe/core/dbt/contracts/graph/unparsed.py#L696) definition

# Context
Currently we have [create_metric property](https://github.com/dbt-labs/dbt-core/blob/15ef88d2ed36fd8bb6aad26325ee11789ff02ffe/core/dbt/contracts/graph/unparsed.py#L700) defined on the [UnparsedMeasure](https://github.com/dbt-labs/dbt-core/blob/15ef88d2ed36fd8bb6aad26325ee11789ff02ffe/core/dbt/contracts/graph/unparsed.py#L696) for [UnparsedSemanticModel](https://github.com/dbt-labs/dbt-core/blob/15ef88d2ed36fd8bb6aad26325ee11789ff02ffe/core/dbt/contracts/graph/unparsed.py#L724)s. The `create_metric` property is incredibly useful, if it were hooked up. However, we haven't hooked it up, and don't have time to do so before the `1.6.0rc` release of core. Thus, for `1.6.x` of core we shouldn't allow users to specify this property.


Discussion:
@QMalcolm Is this something we need to do before cutting the v1.6 RC on Thursday? The alternative seems like: leave it in place for now, knowing that we're planning to add in support for this in v1.7

Resolving patch:
diff --git a/core/dbt/contracts/graph/unparsed.py b/core/dbt/contracts/graph/unparsed.py
--- a/core/dbt/contracts/graph/unparsed.py
+++ b/core/dbt/contracts/graph/unparsed.py
@@ -697,7 +697,6 @@ class UnparsedMeasure(dbtClassMixin):
     name: str
     agg: str  # actually an enum
     description: Optional[str] = None
-    create_metric: bool = False
     expr: Optional[Union[str, bool, int]] = None
     agg_params: Optional[MeasureAggregationParameters] = None
     non_additive_dimension: Optional[UnparsedNonAdditiveDimension] = None
diff --git a/core/dbt/parser/schema_yaml_readers.py b/core/dbt/parser/schema_yaml_readers.py
--- a/core/dbt/parser/schema_yaml_readers.py
+++ b/core/dbt/parser/schema_yaml_readers.py
@@ -499,7 +499,6 @@ def _get_measures(self, unparsed_measures: List[UnparsedMeasure]) -> List[Measur
                     name=unparsed.name,
                     agg=AggregationType(unparsed.agg),
                     description=unparsed.description,
-                    create_metric=unparsed.create_metric,
                     expr=str(unparsed.expr) if unparsed.expr is not None else None,
                     agg_params=unparsed.agg_params,
                     non_additive_dimension=self._get_non_additive_dimension(


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2818] Anonymous usage tracking for semantic object definitions
https://github.com/dbt-labs/dbt-core/blob/b78d23f68d6e9124b74c07e0b101bed00c4171ed/core/dbt/compilation.py#L43-L64

- Tracking should already be in place for `metrics`
- It would be straightforward to add `semantic_models`
- While I'm not sure, it seems like it would be a bigger lift to track counts of `dimensions` and `entities`

**This issue can be closed when:**
- We can guarantee that tracking is working for `metrics` + `semantic_models`
- We have investigated whether there is a straightforward way to extend this tracking to `dimensions` + `entities`


Discussion:

Resolving patch:
diff --git a/core/dbt/compilation.py b/core/dbt/compilation.py
--- a/core/dbt/compilation.py
+++ b/core/dbt/compilation.py
@@ -48,9 +48,10 @@ def print_compile_stats(stats):
         NodeType.Analysis: "analysis",
         NodeType.Macro: "macro",
         NodeType.Operation: "operation",
-        NodeType.Seed: "seed file",
+        NodeType.Seed: "seed",
         NodeType.Source: "source",
         NodeType.Exposure: "exposure",
+        NodeType.SemanticModel: "semantic model",
         NodeType.Metric: "metric",
         NodeType.Group: "group",
     }
@@ -63,7 +64,8 @@ def print_compile_stats(stats):
         resource_counts = {k.pluralize(): v for k, v in results.items()}
         dbt.tracking.track_resource_counts(resource_counts)
 
-    stat_line = ", ".join([pluralize(ct, names.get(t)) for t, ct in results.items() if t in names])
+    # do not include resource types that are not actually defined in the project
+    stat_line = ", ".join([pluralize(ct, names.get(t)) for t, ct in stats.items() if t in names])
 
     fire_event(FoundStats(stat_line=stat_line))
 
@@ -82,16 +84,16 @@ def _generate_stats(manifest: Manifest):
         if _node_enabled(node):
             stats[node.resource_type] += 1
 
-    for source in manifest.sources.values():
-        stats[source.resource_type] += 1
-    for exposure in manifest.exposures.values():
-        stats[exposure.resource_type] += 1
-    for metric in manifest.metrics.values():
-        stats[metric.resource_type] += 1
-    for macro in manifest.macros.values():
-        stats[macro.resource_type] += 1
-    for group in manifest.groups.values():
-        stats[group.resource_type] += 1
+    # Disabled nodes don't appear in the following collections, so we don't check.
+    stats[NodeType.Source] += len(manifest.sources)
+    stats[NodeType.Exposure] += len(manifest.exposures)
+    stats[NodeType.Metric] += len(manifest.metrics)
+    stats[NodeType.Macro] += len(manifest.macros)
+    stats[NodeType.Group] += len(manifest.groups)
+    stats[NodeType.SemanticModel] += len(manifest.semantic_models)
+
+    # TODO: should we be counting dimensions + entities?
+
     return stats
 
 


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2856] [Bug] ParseInlineNodeError does not contain node status
### Is this a new bug in dbt-core?

- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

When running `dbt --log-format json compile --inline 'select * from {{ref("node_not")}}' ` in any project, inspect the events from core you can see `node_info` for `ParseInlineNodeError` do not contain field `node_status`.

### Expected Behavior

`node_info` for `ParseInlineNodeError` contain field `node_status`

### Steps To Reproduce

mentioned above

### Relevant log output

_No response_

### Environment

```markdown
- OS:
- Python:
- dbt:
```


### Which database adapter are you using with dbt?

_No response_

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/core/dbt/task/compile.py b/core/dbt/task/compile.py
--- a/core/dbt/task/compile.py
+++ b/core/dbt/task/compile.py
@@ -139,6 +139,7 @@ def _runtime_initialize(self):
                             "node_path": "sql/inline_query",
                             "node_name": "inline_query",
                             "unique_id": "sqloperation.test.inline_query",
+                            "node_status": "failed",
                         },
                     )
                 )


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2592] Statically parse version keyword argument in ref
https://github.com/dbt-labs/dbt-extractor

Support `v` and `version` keyword argument of `ref` during static extraction. It can accept a string, int, or float


Discussion:
tree-sitter-jinja2 changes now merged: https://github.com/dbt-labs/tree-sitter-jinja2/pull/19

Resolving patch:
diff --git a/core/dbt/parser/models.py b/core/dbt/parser/models.py
--- a/core/dbt/parser/models.py
+++ b/core/dbt/parser/models.py
@@ -497,12 +497,10 @@ def populate(self, node: ModelNode, config: ContextConfig, statically_parsed: Di
         # set refs and sources on the node object
         refs: List[RefArgs] = []
         for ref in statically_parsed["refs"]:
-            if len(ref) == 1:
-                package, name = None, ref[0]
-            else:
-                package, name = ref
-
-            refs.append(RefArgs(package=package, name=name))
+            name = ref.get("name")
+            package = ref.get("package")
+            version = ref.get("version")
+            refs.append(RefArgs(name, package, version))
 
         node.refs += refs
         node.sources += statically_parsed["sources"]
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -73,7 +73,7 @@
         "sqlparse>=0.2.3",
         # ----
         # These are major-version-0 packages also maintained by dbt-labs. Accept patches.
-        "dbt-extractor~=0.4.1",
+        "dbt-extractor~=0.5.0",
         "hologram~=0.0.16",  # includes transitive dependencies on python-dateutil and jsonschema
         "minimal-snowplow-tracker~=0.0.2",
         # DSI is under active development, so we're pinning to specific dev versions for now.


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2846] Update dependency pins: `click<9` + `sqlparse<0.5`
Unpin `click` now that a new version has been released that _should_ fix the typing issues:
- https://github.com/dbt-labs/dbt-core/issues/8048
- https://github.com/pallets/click/issues/2558#issuecomment-1640926299

---

We removed the `sqlparse` pin in https://github.com/dbt-labs/dbt-core/pull/7993 — but we should still have an upper bound since it's major-0 software. Previously we had the upper bound pinned to `<0.5`.

---

We should backport to `1.6.latest` (for inclusion in v1.6.0rc2/final) + `1.5.latest` (for inclusion in v1.5.4)


Discussion:
Looks like there are still some issues with `mypy` + `click==8.1.6`: https://github.com/dbt-labs/dbt-core/pull/8146#issuecomment-1641859347

Resolving patch:
diff --git a/core/dbt/cli/params.py b/core/dbt/cli/params.py
--- a/core/dbt/cli/params.py
+++ b/core/dbt/cli/params.py
@@ -389,9 +389,9 @@
 # Most CLI arguments should use the combined `select` option that aliases `--models` to `--select`.
 # However, if you need to split out these separators (like `dbt ls`), use the `models` and `raw_select` options instead.
 # See https://github.com/dbt-labs/dbt-core/pull/6774#issuecomment-1408476095 for more info.
-models = click.option(*model_decls, **select_attrs)
-raw_select = click.option(*select_decls, **select_attrs)
-select = click.option(*select_decls, *model_decls, **select_attrs)
+models = click.option(*model_decls, **select_attrs)  # type: ignore[arg-type]
+raw_select = click.option(*select_decls, **select_attrs)  # type: ignore[arg-type]
+select = click.option(*select_decls, *model_decls, **select_attrs)  # type: ignore[arg-type]
 
 selector = click.option(
     "--selector",
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -59,8 +59,7 @@
         # ----
         # dbt-core uses these packages in standard ways. Pin to the major version, and check compatibility
         # with major versions in each new minor version of dbt-core.
-        # temporarily pinning click for mypy failures: https://github.com/pallets/click/issues/2558
-        "click>=8.1.1,<8.1.4",
+        "click<9",
         "networkx>=2.3,<4",
         # ----
         # These packages are major-version-0. Keep upper bounds on upcoming minor versions (which could have breaking changes)


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2846] Update dependency pins: `click<9` + `sqlparse<0.5`
Unpin `click` now that a new version has been released that _should_ fix the typing issues:
- https://github.com/dbt-labs/dbt-core/issues/8048
- https://github.com/pallets/click/issues/2558#issuecomment-1640926299

---

We removed the `sqlparse` pin in https://github.com/dbt-labs/dbt-core/pull/7993 — but we should still have an upper bound since it's major-0 software. Previously we had the upper bound pinned to `<0.5`.

---

We should backport to `1.6.latest` (for inclusion in v1.6.0rc2/final) + `1.5.latest` (for inclusion in v1.5.4)


Discussion:
Looks like there are still some issues with `mypy` + `click==8.1.6`: https://github.com/dbt-labs/dbt-core/pull/8146#issuecomment-1641859347

Resolving patch:
diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -69,8 +69,7 @@
         "pathspec>=0.9,<0.12",
         "isodate>=0.6,<0.7",
         # ----
-        # There was a pin to below 0.4.4 for a while due to a bug in Ubuntu/sqlparse 0.4.4
-        "sqlparse>=0.2.3",
+        "sqlparse>=0.2.3,<0.5",
         # ----
         # These are major-version-0 packages also maintained by dbt-labs. Accept patches.
         "dbt-extractor~=0.5.0",


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2972] [Epic] MyPy Cleanup
```[tasklist]
### Resolve warnings
- [ ] https://github.com/dbt-labs/dbt-core/issues/8389
- [ ] https://github.com/dbt-labs/dbt-core/issues/8390
- [ ] https://github.com/dbt-labs/dbt-core/issues/8391
- [ ] https://github.com/dbt-labs/dbt-core/issues/8392
- [ ] https://github.com/dbt-labs/dbt-core/issues/8393
- [ ] https://github.com/dbt-labs/dbt-core/issues/8394
- [ ] https://github.com/dbt-labs/dbt-core/issues/8395
- [ ] https://github.com/dbt-labs/dbt-core/issues/8396
- [ ] https://github.com/dbt-labs/dbt-core/issues/8397
- [ ] https://github.com/dbt-labs/dbt-core/issues/8398
- [ ] https://github.com/dbt-labs/dbt-core/issues/8399
- [ ] https://github.com/dbt-labs/dbt-core/issues/8400
- [ ] https://github.com/dbt-labs/dbt-core/issues/8401
- [ ] https://github.com/dbt-labs/dbt-core/issues/8402
- [ ] https://github.com/dbt-labs/dbt-core/issues/8403
- [ ] https://github.com/dbt-labs/dbt-core/issues/8404
```

```[tasklist]
### Other MyPy Errors
- [ ] #4704
- [ ] https://github.com/dbt-labs/dbt-core/issues/5225
- [ ] Determine if we can enforce function types and how to do it
```



Discussion:

Resolving patch:
diff --git a/core/dbt/adapters/base/meta.py b/core/dbt/adapters/base/meta.py
--- a/core/dbt/adapters/base/meta.py
+++ b/core/dbt/adapters/base/meta.py
@@ -93,7 +93,7 @@ class AdapterMeta(abc.ABCMeta):
     _available_: FrozenSet[str]
     _parse_replacements_: Dict[str, Callable]
 
-    def __new__(mcls, name, bases, namespace, **kwargs):
+    def __new__(mcls, name, bases, namespace, **kwargs) -> "AdapterMeta":
         # mypy does not like the `**kwargs`. But `ABCMeta` itself takes
         # `**kwargs` in its argspec here (and passes them to `type.__new__`.
         # I'm not sure there is any benefit to it after poking around a bit,
diff --git a/core/dbt/adapters/factory.py b/core/dbt/adapters/factory.py
--- a/core/dbt/adapters/factory.py
+++ b/core/dbt/adapters/factory.py
@@ -19,7 +19,7 @@
 
 
 class AdapterContainer:
-    def __init__(self):
+    def __init__(self) -> None:
         self.lock = threading.Lock()
         self.adapters: Dict[str, Adapter] = {}
         self.plugins: Dict[str, AdapterPlugin] = {}


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2982] Fix untyped functions in task/base.py (mypy warning)
### Problem
When we hit a mypy error the console is flooded with mypy warnings as well.  Clean up the warning to improve developer experience. 

### Reproduction
Simply force a mypy error (change types) and the warnings will be generated.

### Relevant Output
```
core/dbt/task/base.py:204: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
```
[CT-2982] Fix untyped functions in task/base.py (mypy warning)
### Problem
When we hit a mypy error the console is flooded with mypy warnings as well.  Clean up the warning to improve developer experience. 

### Reproduction
Simply force a mypy error (change types) and the warnings will be generated.

### Relevant Output
```
core/dbt/task/base.py:204: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
```


Discussion:

Resolving patch:
diff --git a/core/dbt/task/base.py b/core/dbt/task/base.py
--- a/core/dbt/task/base.py
+++ b/core/dbt/task/base.py
@@ -193,7 +193,7 @@ def __init__(self, node):
 
 
 class BaseRunner(metaclass=ABCMeta):
-    def __init__(self, config, adapter, node, node_index, num_nodes):
+    def __init__(self, config, adapter, node, node_index, num_nodes) -> None:
         self.config = config
         self.adapter = adapter
         self.node = node


Test patch:
Repository: dbt-labs/dbt-core

Issue:
[CT-2964] Backport #7630 to 1.3 and 1.4
The security fix made for #7630 in 1.5 and 1.6 to exclude some profile fields from Jinja rendering now needs to be backported to 1.3 and 1.4.


Discussion:

Resolving patch:
diff --git a/core/dbt/config/renderer.py b/core/dbt/config/renderer.py
--- a/core/dbt/config/renderer.py
+++ b/core/dbt/config/renderer.py
@@ -182,7 +182,17 @@ def render_value(self, value: Any, keypath: Optional[Keypath] = None) -> Any:
         # First, standard Jinja rendering, with special handling for 'secret' environment variables
         # "{{ env_var('DBT_SECRET_ENV_VAR') }}" -> "$$$DBT_SECRET_START$$$DBT_SECRET_ENV_{VARIABLE_NAME}$$$DBT_SECRET_END$$$"
         # This prevents Jinja manipulation of secrets via macros/filters that might leak partial/modified values in logs
-        rendered = super().render_value(value, keypath)
+
+        try:
+            rendered = super().render_value(value, keypath)
+        except Exception as ex:
+            if keypath and "password" in keypath:
+                # Passwords sometimes contain jinja-esque characters, but we
+                # don't want to render them if they aren't valid jinja.
+                rendered = value
+            else:
+                raise ex
+
         # Now, detect instances of the placeholder value ($$$DBT_SECRET_START...DBT_SECRET_END$$$)
         # and replace them with the actual secret value
         if SECRET_ENV_PREFIX in str(rendered):


Test patch: