jiangxt2 opened a new pull request, #13743: URL: https://github.com/apache/gravitino/pull/13743
### What changes were proposed in this pull request? Make HTTP request headers local to each request. The client now copies configured headers and merges per-request headers into a request-local map, preserving the existing override order and JSON/form content-type behavior. Add unit and Fileset integration coverage for header isolation after successful and failed requests. ### Why are the changes needed? Per-request headers were being merged into the HTTP client's persistent headers, so they could leak into later calls and mutate the caller-provided header dictionary. This change keeps request-specific context, including CallerContext headers, scoped to the request that supplied it. Fix: #13735 ### Does this PR introduce _any_ user-facing change? Yes. It fixes per-request headers so they no longer affect subsequent calls made through the same client. There are no API additions or removals. ### How was this patch tested? - From `clients/client-python/tests/unittests`, `python -m coverage run --branch -m unittest`: 1,183 tests passed under Python 3.12.12. - From `clients/client-python/tests/integration`, `START_EXTERNAL_GRAVITINO=true PROJECT_VERSION=2.0.0-SNAPSHOT python -m unittest -v test_fileset_catalog.TestFilesetCatalog.test_get_file_location`: 1 test passed against the matching Docker server. - `ruff check`, `ruff format --check`, and `git diff --check` passed. - `./gradlew :clients:client-python:compileDistribution -PskipWeb=true -x test` passed with Corretto 17.0.18. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
