mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
ci(e2e): reload the stack config every 7s so the harness propagation budget holds, and only mask credential-named values
This commit is contained in:
parent
2bce27cfa6
commit
1c4e46f17e
2 changed files with 6 additions and 2 deletions
7
.github/e2e-stack/secrets_to_env.py
vendored
7
.github/e2e-stack/secrets_to_env.py
vendored
|
|
@ -1,9 +1,12 @@
|
|||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
from pydantic import TypeAdapter
|
||||
|
||||
secrets_adapter: TypeAdapter[dict[str, str]] = TypeAdapter(dict[str, str])
|
||||
SECRET_NAME: Final = re.compile(r"KEY|SECRET|TOKEN|PASS|CREDENTIAL|LICENSE|AUTH")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
|
|
@ -18,8 +21,8 @@ def main() -> int:
|
|||
lines = tuple(f"{key}='{value}'" for key, value in secrets.items() if value)
|
||||
with env_path.open("a") as handle:
|
||||
_ = handle.write("\n".join(lines) + "\n")
|
||||
for value in secrets.values():
|
||||
if value:
|
||||
for key, value in secrets.items():
|
||||
if value and SECRET_NAME.search(key):
|
||||
_ = sys.stdout.write(f"::add-mask::{value}\n")
|
||||
return 0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
general_settings:
|
||||
proxy_config_reload_interval_seconds: 7
|
||||
store_prompts_in_spend_logs: true
|
||||
database_connection_pool_limit: 10
|
||||
forward_client_headers_to_llm_api: false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue