File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1212 - Removed the workaround for a Python 2.7 bug.
1313 - Added a <19.0.0 pin to pyarrow as a workaround to a bug affecting Azure Batch.
1414 - Optimized distribution package lookup to speed up import.
15+ - Fixed a bug where privatelink OCSP Cache url could not be determined if privatelink account name was specified in uppercase
1516
1617- v3.13.2(January 29, 2025)
1718 - Changed not to use scoped temporary objects.
Original file line number Diff line number Diff line change @@ -926,6 +926,7 @@ def __set_error_attributes(self) -> None:
926926
927927 @staticmethod
928928 def setup_ocsp_privatelink (app , hostname ) -> None :
929+ hostname = hostname .lower ()
929930 SnowflakeConnection .OCSP_ENV_LOCK .acquire ()
930931 ocsp_cache_server = f"http://ocsp.{ hostname } /ocsp_response_cache.json"
931932 os .environ ["SF_OCSP_RESPONSE_CACHE_SERVER_URL" ] = ocsp_cache_server
@@ -957,7 +958,7 @@ def __open_connection(self):
957958 os .environ ["SF_OCSP_RESPONSE_CACHE_SERVER_URL" ],
958959 )
959960
960- if ".privatelink.snowflakecomputing." in self .host :
961+ if ".privatelink.snowflakecomputing." in self .host . lower () :
961962 SnowflakeConnection .setup_ocsp_privatelink (self .application , self .host )
962963 else :
963964 if "SF_OCSP_RESPONSE_CACHE_SERVER_URL" in os .environ :
Original file line number Diff line number Diff line change @@ -672,6 +672,19 @@ def test_privatelink_ocsp_url_creation():
672672 )
673673
674674
675+ @pytest .mark .skipolddriver
676+ def test_uppercase_privatelink_ocsp_url_creation ():
677+ account = "TESTACCOUNT.US-EAST-1.PRIVATELINK"
678+ hostname = account + ".snowflakecomputing.com"
679+
680+ SnowflakeConnection .setup_ocsp_privatelink (CLIENT_NAME , hostname )
681+ ocsp_cache_server = os .getenv ("SF_OCSP_RESPONSE_CACHE_SERVER_URL" , None )
682+ assert (
683+ ocsp_cache_server
684+ == "http://ocsp.testaccount.us-east-1.privatelink.snowflakecomputing.com/ocsp_response_cache.json"
685+ )
686+
687+
675688def test_privatelink_ocsp_url_multithreaded ():
676689 bucket = queue .Queue ()
677690
You can’t perform that action at this time.
0 commit comments