SNOW-1362666: Multiple calls to write_pandas
with the same global random seed can result in stage name collisions
#1937
Labels
status-information_needed
Additional information is required from the reporter
status-triage
Issue is under initial triage
Python version
Python 3.11.6 (main, Oct 8 2023, 05:06:43) [GCC 13.2.0]
Operating system and processor architecture
Linux-6.6.16-linuxkit-aarch64-with-glibc2.38
Installed packages
What did you do?
I call
write_pandas
in a loop, but there's another function from a different package in that same loop that resets the global seed to a specific state (I recognize this is poor form and am working on a fix for that separately).The problem is that
snowflake-connector-python
's_create_temp_stage
function callsrandom_string
to generate temporary stage names, over which the user does not have control:snowflake-connector-python/src/snowflake/connector/pandas_tools.py
Line 95 in 8cdca67
random_string
in turn relies on therandom
module:snowflake-connector-python/test/randomize.py
Line 30 in 8cdca67
so if the user sets the seed deterministically outside the scope of calling
write_pandas
then this will result in stage name collisions throwing an opaque error such as the following:which triggers on line 81 in
_do_create_temp_stage
:snowflake-connector-python/src/snowflake/connector/pandas_tools.py
Line 81 in 8cdca67
What did you expect to see?
What I wish would have happened instead is that there would be one of the following:
stage_name
Can you set logging to DEBUG and collect the logs?
No response
The text was updated successfully, but these errors were encountered: