Skip to content

Commit b68cc00

Browse files
committed
chore: rename AIRBYTE_ALLOW_CUSTOM_CODE to AIRBYTE_ENABLE_UNSAFE_CODE
1 parent 545e2ac commit b68cc00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
INJECTED_MANIFEST = "__injected_declarative_manifest"
2020
INJECTED_COMPONENTS_PY = "__injected_components_py"
2121
INJECTED_COMPONENTS_PY_CHECKSUMS = "__injected_components_py_checksums"
22-
ENV_VAR_ALLOW_CUSTOM_CODE = "AIRBYTE_ALLOW_CUSTOM_CODE"
22+
ENV_VAR_ALLOW_CUSTOM_CODE = "AIRBYTE_ENABLE_UNSAFE_CODE"
2323

2424

2525
class AirbyteCodeTamperedError(Exception):
@@ -35,7 +35,7 @@ class AirbyteCustomCodeNotPermittedError(Exception):
3535
def __init__(self) -> None:
3636
super().__init__(
3737
"Custom connector code is not permitted in this environment. "
38-
"If you need to run custom code, please ask your administrator to set the `AIRBYTE_ALLOW_CUSTOM_CODE` "
38+
"If you need to run custom code, please ask your administrator to set the `AIRBYTE_ENABLE_UNSAFE_CODE` "
3939
"environment variable to 'true' in your Airbyte environment. "
4040
"If you see this message in Airbyte Cloud, your workspace does not allow executing "
4141
"custom connector code."
@@ -55,7 +55,7 @@ def _hash_text(input_text: str, hash_type: str = "md5") -> str:
5555
def custom_code_execution_permitted() -> bool:
5656
"""Return `True` if custom code execution is permitted, otherwise `False`.
5757
58-
Custom code execution is permitted if the `AIRBYTE_ALLOW_CUSTOM_CODE` environment variable is set to 'true'.
58+
Custom code execution is permitted if the `AIRBYTE_ENABLE_UNSAFE_CODE` environment variable is set to 'true'.
5959
"""
6060
return os.environ.get(ENV_VAR_ALLOW_CUSTOM_CODE, "").lower() == "true"
6161

0 commit comments

Comments
 (0)