Skip to content

Commit

Permalink
use the secret constant from dbt-common
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Apr 23, 2024
1 parent 1014a6d commit bf0cd5f
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion core/dbt/artifacts/schemas/run/v5/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from datetime import datetime


from dbt.constants import SECRET_ENV_PREFIX
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.artifacts.resources import CompiledResource
from dbt.artifacts.schemas.base import (
BaseArtifactMetadata,
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/config/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from dbt.clients.jinja import get_rendered
from dbt_common.clients.jinja import catch_jinja
from dbt.constants import SECRET_ENV_PREFIX, DEPENDENCIES_FILE_NAME
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEPENDENCIES_FILE_NAME
from dbt.context.target import TargetContext
from dbt.context.secret import SecretContext, SECRET_PLACEHOLDER
from dbt.context.base import BaseContext
Expand Down
2 changes: 0 additions & 2 deletions core/dbt/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO: remove SECRET_ENV_PREFIX and import from dbt_common
SECRET_ENV_PREFIX = "DBT_ENV_SECRET_"
DEFAULT_ENV_PLACEHOLDER = "DBT_DEFAULT_PLACEHOLDER"

MAXIMUM_SEED_SIZE = 1 * 1024 * 1024
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/context/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from dbt import utils
from dbt.clients.jinja import get_rendered
from dbt.clients.yaml_helper import yaml, safe_load, SafeLoader, Loader, Dumper # noqa: F401
from dbt.constants import SECRET_ENV_PREFIX, DEFAULT_ENV_PLACEHOLDER
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.contracts.graph.nodes import Resource
from dbt.exceptions import (
SecretEnvVarLocationError,
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/context/configured.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from dbt_common.context import get_invocation_context

from dbt.constants import SECRET_ENV_PREFIX, DEFAULT_ENV_PLACEHOLDER
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.adapters.contracts.connection import AdapterRequiredConfig
from dbt.node_types import NodeType
from dbt.utils import MultiDict
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
from dbt.adapters.factory import get_adapter, get_adapter_package_names, get_adapter_type_names
from dbt.clients.jinja import get_rendered, MacroGenerator, MacroStack, UnitTestMacroGenerator
from dbt.config import RuntimeConfig, Project
from dbt.constants import SECRET_ENV_PREFIX, DEFAULT_ENV_PLACEHOLDER
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.context.base import contextmember, contextproperty, Var
from dbt.context.configured import FQNLookup
from dbt.context.context_config import ContextConfig
Expand Down
3 changes: 2 additions & 1 deletion core/dbt/context/secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from .base import BaseContext, contextmember

from dbt.constants import SECRET_ENV_PREFIX, DEFAULT_ENV_PLACEHOLDER
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.exceptions import EnvVarMissingError


Expand Down
2 changes: 1 addition & 1 deletion core/dbt/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from dbt_common.dataclass_schema import ValidationError

from dbt.constants import SECRET_ENV_PREFIX
from dbt_common.constants import SECRET_ENV_PREFIX


if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/parser/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
MANIFEST_FILE_NAME,
PARTIAL_PARSE_FILE_NAME,
SEMANTIC_MANIFEST_FILE_NAME,
SECRET_ENV_PREFIX,
)
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt_common.helper_types import PathSet
from dbt_common.events.functions import fire_event, get_invocation_id, warn_or_error
from dbt_common.events.types import (
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/context_methods/test_env_vars.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest
import os

from dbt.constants import SECRET_ENV_PREFIX, DEFAULT_ENV_PLACEHOLDER
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.constants import DEFAULT_ENV_PLACEHOLDER
from dbt.tests.util import run_dbt, get_manifest, run_dbt_and_capture


Expand Down
2 changes: 1 addition & 1 deletion tests/functional/context_methods/test_secret_env_vars.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import os

from dbt.constants import SECRET_ENV_PREFIX
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.exceptions import ParsingError, DbtInternalError
from tests.functional.context_methods.first_dependency import FirstDependencyProject
from dbt.tests.util import run_dbt, run_dbt_and_capture, read_file
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/partial_parsing/test_pp_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path

import pytest
from dbt.constants import SECRET_ENV_PREFIX
from dbt_common.constants import SECRET_ENV_PREFIX
from dbt.exceptions import ParsingError
from dbt.adapters.exceptions import FailedToConnectError
from dbt.tests.util import get_manifest, run_dbt, run_dbt_and_capture, write_file
Expand Down

0 comments on commit bf0cd5f

Please sign in to comment.