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

Support secret dict #107

Merged
merged 1 commit into from
Dec 28, 2022
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 prefect_dbt/cli/configs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Any, Dict, Optional

from prefect.blocks.core import Block
from pydantic import BaseModel, Field, SecretBytes, SecretStr
from pydantic import BaseModel, Field, SecretField


class DbtConfigs(Block, abc.ABC):
Expand Down Expand Up @@ -55,7 +55,7 @@ def _populate_configs_json(
f"The keyword, {field_name}, has already been provided in "
f"TargetConfigs; remove duplicated keywords to continue"
)
if isinstance(field_value, (SecretStr, SecretBytes)):
if isinstance(field_value, SecretField):
field_value = field_value.get_secret_value()
configs_json[field_name] = field_value

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
prefect>=2.0.0
prefect>=2.7.2
prefect_shell>=0.1.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
extras_require = {
"cli": ["dbt_core>=1.1.1"],
"snowflake": ["prefect-snowflake>=0.2.0"],
"bigquery": ["prefect-gcp>=0.1.5"],
"postgres": ["prefect-sqlalchemy>=0.1.1"],
"bigquery": ["prefect-gcp>=0.1.8"],
"postgres": ["prefect-sqlalchemy>=0.2.1"],
}
extras_require["all_extras"] = sorted(
{lib for key in extras_require.values() for lib in key}
Expand Down