ci(e2e): drop trailing newlines from fetched secret values before writing the env

This commit is contained in:
Yuneng Jiang 2026-09-02 15:39:21 -07:00
parent 743f94f82a
commit c62643f0cf
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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
)

View file

@ -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