Skip to content

fix(client): apply proxy_url on HTTP transport, not process env (#552) - #574

Merged
leandrodamascena merged 2 commits into
ferrumio:mainfrom
ShahadatTest:fix/552-proxy-url-no-env-mutation
Nov 2, 2026
Merged

leandrodamascena merged 2 commits into
ferrumio:mainfrom
ShahadatTest:fix/552-proxy-url-no-env-mutation

Conversation

@ShahadatTest

Copy link
Copy Markdown
Contributor

Summary

Fixes #552.

proxy_url on DynamoDB / S3 / KMS constructors previously did std::env::set_var(\"HTTPS_PROXY\", …), which mutated process-wide state, overwrote an existing proxy, and leaked into child processes.

This change:

  • Removes the HTTPS_PROXY env mutation from all three constructors
  • Applies proxy_url via aws-smithy-http-client ProxyConfig on each client's SDK HTTP transport in the shared build_sdk_config path (so lazy S3/KMS clients from a DynamoDB client inherit it)
  • Documents that proxy_url is per-client and does not set process env
  • Adds a unit test that constructs clients with different proxies and asserts both Python os.environ and a child process's native HTTPS_PROXY stay unchanged

Test plan

  • cargo check --lib
  • pytest tests/unit/test_proxy_url_env.py (needs built extension / CI)
  • Optional: two concurrent clients with different proxies against a local proxy that records Host headers

AI-assisted contribution.

…umio#552)

Stop writing HTTPS_PROXY from DynamoDB/S3/KMS constructors. Route
proxy_url through aws-smithy-http-client ProxyConfig on each client's
SDK HTTP stack so concurrent clients keep independent proxies and an
existing HTTPS_PROXY stays untouched.
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@leandrodamascena

Copy link
Copy Markdown
Member

Thanks, @ShahadatTest! I pushed two fixes to your branch: proxy requests now respect the configured timeouts, and AssumeRole uses the proxy too, including roles configured in profiles. I added Python tests for sync and async; the full local suite and examples passed. Thanks for working on this 🙂

@leandrodamascena
leandrodamascena merged commit f2ed1b9 into ferrumio:main Nov 2, 2026
16 of 18 checks passed
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] proxy_url changes the process environment

2 participants