From 87a1d6ee026fda4a4490902c40db7a9a52ad1a56 Mon Sep 17 00:00:00 2001 From: Xander Song Date: Mon, 9 Sep 2024 13:06:00 -0700 Subject: [PATCH] chore(auth): rename env vars (#4555) --- app/package.json | 2 +- src/phoenix/config.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/package.json b/app/package.json index 0700a75d53..55d3b3422d 100644 --- a/app/package.json +++ b/app/package.json @@ -89,7 +89,7 @@ "build:relay": "relay-compiler", "test": "jest --config ./jest.config.js", "dev": "pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite", - "dev:auth": "export DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH=true && export DANGEROUSLY_SET_PHOENIX_SECRET=sa18f44bd9b6b4b0606e58a2d03d09039aee8283e0074c6517fda58577a07dd#A && pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite", + "dev:auth": "export PHOENIX_ENABLE_AUTH=true && export PHOENIX_SECRET=sa18f44bd9b6b4b0606e58a2d03d09039aee8283e0074c6517fda58577a07dd#A && pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite", "dev:ui": "pnpm run build:static && pnpm run build:relay && vite", "dev:server:init": "python -m phoenix.server.main --dev serve --with-fixture=chatbot --with-project=demo_llama_index --force-fixture-ingestion", "dev:server": "python -m phoenix.server.main --dev serve", diff --git a/src/phoenix/config.py b/src/phoenix/config.py index 7618e178d1..ccd4a2611d 100644 --- a/src/phoenix/config.py +++ b/src/phoenix/config.py @@ -88,8 +88,8 @@ # Auth is under active development. Phoenix users are strongly advised not to # set these environment variables until the feature is officially released. -ENV_PHOENIX_ENABLE_AUTH = "DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH" -ENV_PHOENIX_SECRET = "DANGEROUSLY_SET_PHOENIX_SECRET" +ENV_PHOENIX_ENABLE_AUTH = "PHOENIX_ENABLE_AUTH" +ENV_PHOENIX_SECRET = "PHOENIX_SECRET" ENV_PHOENIX_API_KEY = "PHOENIX_API_KEY" ENV_PHOENIX_USE_SECURE_COOKIES = "PHOENIX_USE_SECURE_COOKIES" @@ -148,14 +148,14 @@ def get_boolean_env_var(env_var: str) -> Optional[bool]: def get_env_enable_auth() -> bool: """ - Gets the value of the DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH environment variable. + Gets the value of the PHOENIX_ENABLE_AUTH environment variable. """ return get_boolean_env_var(ENV_PHOENIX_ENABLE_AUTH) is True def get_env_phoenix_secret() -> Optional[str]: """ - Gets the value of the DANGEROUSLY_SET_PHOENIX_SECRET environment variable + Gets the value of the PHOENIX_SECRET environment variable and performs validation. """ phoenix_secret = os.environ.get(ENV_PHOENIX_SECRET)