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

Commit

Permalink
Support secret dict (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and ahuang11 committed Jan 4, 2023
1 parent 8f1cd49 commit 40f70bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 40f70bc

Please sign in to comment.