Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix log format (#118)
Browse files Browse the repository at this point in the history
* Fix log format

* Add changelog
  • Loading branch information
ahuang11 authored Feb 7, 2023
1 parent 1cf0d03 commit 0953b8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Preventing `TargetConfigs` from being dropped upon loading a `DbtCliProfile` - [#115](https://github.com/PrefectHQ/prefect-dbt/pull/115)
- The input type of `GlobalConfigs.log_format` [#118](https://github.com/PrefectHQ/prefect-dbt/pull/118)

### Security

Expand Down
2 changes: 1 addition & 1 deletion prefect_dbt/cli/configs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class GlobalConfigs(DbtConfigs):
default=None,
description="Whether to convert dbt warnings into errors.",
)
log_format: Optional[bool] = Field(
log_format: Optional[str] = Field(
default=None,
description=(
"The LOG_FORMAT config specifies how dbt's logs should "
Expand Down
8 changes: 7 additions & 1 deletion tests/cli/configs/test_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from prefect_dbt.cli.configs.base import TargetConfigs
from prefect_dbt.cli.configs.base import GlobalConfigs, TargetConfigs


def test_target_configs_get_configs():
Expand All @@ -26,3 +26,9 @@ def test_target_configs_get_configs_duplicate_keys():
extras={"extra_input": 1, "schema": "something else"},
)
target_configs.get_configs()


def test_global_configs():
global_configs = GlobalConfigs(log_format="json", send_anonymous_usage_stats=False)
assert global_configs.log_format == "json"
assert global_configs.send_anonymous_usage_stats is False

0 comments on commit 0953b8f

Please sign in to comment.