-
Notifications
You must be signed in to change notification settings - Fork 573
SNOW-3880829: detect_platforms() is not cached as expected #2983
Open
Description
Python version
Python 3.11.6 (main, Nov 7 2023, 15:13:01) [GCC 11.4.0]
Operating system and processor architecture
Linux-6.8.0-124-generic-x86_64-with-glibc2.35
What did you do?
detect_platforms() is decorated with @functools.cache (platform_detection.py), so platform detection should run once per process. But the only call site passes a fresh SessionManager clone on every call (auth/_auth.py, Auth.base_auth_data):
"PLATFORM": detect_platforms( platform_detection_timeout_seconds=platform_detection_timeout_seconds, session_manager=session_manager.clone(max_retries=0), ),
What did you expect to see?
Detection runs once per process; subsequent connect() calls reuse the cached result.