mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
ci(e2e): drop trailing newlines from fetched secret values before writing the env
This commit is contained in:
parent
743f94f82a
commit
c62643f0cf
2 changed files with 2 additions and 2 deletions
2
.github/e2e-stack/secrets_to_env.py
vendored
2
.github/e2e-stack/secrets_to_env.py
vendored
|
|
@ -8,7 +8,7 @@ secrets_adapter: TypeAdapter[dict[str, str]] = TypeAdapter(dict[str, str])
|
|||
|
||||
def main() -> int:
|
||||
env_path = Path(sys.argv[1])
|
||||
secrets = secrets_adapter.validate_json(sys.stdin.read())
|
||||
secrets = {key: value.rstrip("\r\n") for key, value in secrets_adapter.validate_json(sys.stdin.read()).items()}
|
||||
unwritable = tuple(
|
||||
key for key, value in secrets.items() if "'" in value or "\n" in value or "\r" in value
|
||||
)
|
||||
|
|
|
|||
2
.github/workflows/test-e2e-changed.yml
vendored
2
.github/workflows/test-e2e-changed.yml
vendored
|
|
@ -132,7 +132,7 @@ jobs:
|
|||
| uv run --no-sync python .github/e2e-stack/secrets_to_env.py tests/e2e/.env
|
||||
aws secretsmanager get-secret-value --secret-id litellm-e2e-changed-license \
|
||||
--query SecretString --output text \
|
||||
| jq -R -s '{"LITELLM_LICENSE": rtrimstr("\n")}' \
|
||||
| jq -R -s '{"LITELLM_LICENSE": .}' \
|
||||
| uv run --no-sync python .github/e2e-stack/secrets_to_env.py tests/e2e/.env
|
||||
|
||||
- name: Boot the stage-mirror stack
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue