| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adds module-level caching of Azure Identity credential instances in mssql_python AAD auth flows to reduce repeated credential construction and enable Azure Identity’s in-memory token caching, along with new tests and a benchmark for measuring the impact.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| mssql_python/auth.py | Introduces a global credential-instance cache guarded by a lock and updates token acquisition to reuse credentials. |
| tests/test_008_auth.py | Adds cache-clearing fixture and new tests for credential reuse, import-error handling, and edge cases. |
| benchmarks/bench_credential_cache.py | Adds a standalone benchmark script to quantify the performance effect of credential-instance caching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 67.8%
mssql_python.row.py: 70.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 73.9%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.__init__.py: 77.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 85.2%🔗 Quick Links
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Work Item / Issue Reference
Summary
This pull request introduces credential instance caching for Azure Active Directory (AAD) authentication in the mssql_python package, improving performance by reusing credential objects instead of creating new ones for each token request. It also adds comprehensive tests for the caching logic and edge cases, and includes a new benchmark script to measure the performance impact of credential caching.
Credential instance caching and logic changes:
Testing improvements:
Benchmarking: