Skip to content

SNOW-3880829: detect_platforms() is not cached as expected #2983

Description

@etienne-lebrun

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions