Skip to content

Commit f560c82

Browse files
SNOW-2048239 revert zero timeout for oscp cache lock (#2283)
1 parent b32dc8d commit f560c82

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

DESCRIPTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
2727
- Improved security and robustness for the temporary credentials cache storage.
2828
- Fixed a bug that caused driver to fail silently on `TO_DATE` arrow to python conversion when invalid date was followed by the correct one.
2929
- Fixed expired S3 credentials update and increment retry when expired credentials are found.
30+
- Deprecated `insecure_mode` connection property and replaced it with `disable_ocsp_checks` with the same behavior as the former property.
3031

3132
- v3.14.0(March 03, 2025)
3233
- Bumped pyOpenSSL dependency upper boundary from <25.0.0 to <26.0.0.
@@ -38,7 +39,6 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
3839
- Fixed a bug where file permission check happened on Windows.
3940
- Added support for File types.
4041
- Added `unsafe_file_write` connection parameter that restores the previous behaviour of saving files downloaded with GET with 644 permissions.
41-
- Deprecated `insecure_mode` connection property and replaced it with `disable_ocsp_checks` with the same behavior as the former property.
4242

4343
- v3.13.2(January 29, 2025)
4444
- Changed not to use scoped temporary objects.

src/snowflake/connector/ocsp_snowflake.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def _deserialize(cls, opened_fd) -> _OCSPResponseValidationResultCache:
227227
OCSPResponseValidationResult,
228228
] = _OCSPResponseValidationResultCache(
229229
entry_lifetime=constants.DAY_IN_SECONDS,
230-
file_timeout=60.0,
231230
file_path={
232231
"linux": os.path.join(
233232
"~", ".cache", "snowflake", "ocsp_response_validation_cache.json"

test/unit/test_ocsp.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ def test_ocsp_bad_validity():
257257
del environ["SF_TEST_OCSP_FORCE_BAD_RESPONSE_VALIDITY"]
258258

259259

260-
@pytest.mark.flaky(reruns=3)
261260
def test_ocsp_single_endpoint():
262261
environ["SF_OCSP_ACTIVATE_NEW_ENDPOINT"] = "True"
263262
SnowflakeOCSP.clear_cache()
@@ -281,7 +280,6 @@ def test_ocsp_by_post_method():
281280
assert ocsp.validate(url, connection), f"Failed to validate: {url}"
282281

283282

284-
@pytest.mark.flaky(reruns=3)
285283
def test_ocsp_with_file_cache(tmpdir):
286284
"""OCSP tests and the cache server and file."""
287285
tmp_dir = str(tmpdir.mkdir("ocsp_response_cache"))
@@ -295,7 +293,6 @@ def test_ocsp_with_file_cache(tmpdir):
295293
assert ocsp.validate(url, connection), f"Failed to validate: {url}"
296294

297295

298-
@pytest.mark.flaky(reruns=3)
299296
@pytest.mark.skipolddriver
300297
def test_ocsp_with_bogus_cache_files(tmpdir, random_ocsp_response_validation_cache):
301298
with mock.patch(
@@ -335,7 +332,6 @@ def test_ocsp_with_bogus_cache_files(tmpdir, random_ocsp_response_validation_cac
335332
)
336333

337334

338-
@pytest.mark.flaky(reruns=3)
339335
@pytest.mark.skipolddriver
340336
def test_ocsp_with_outdated_cache(tmpdir, random_ocsp_response_validation_cache):
341337
with mock.patch(
@@ -396,7 +392,6 @@ def _store_cache_in_file(tmpdir, target_hosts=None):
396392
return filename, target_hosts
397393

398394

399-
@pytest.mark.flaky(reruns=3)
400395
def test_ocsp_with_invalid_cache_file():
401396
"""OCSP tests with an invalid cache file."""
402397
SnowflakeOCSP.clear_cache() # reset the memory cache
@@ -406,7 +401,6 @@ def test_ocsp_with_invalid_cache_file():
406401
assert ocsp.validate(url, connection), f"Failed to validate: {url}"
407402

408403

409-
@pytest.mark.flaky(reruns=3)
410404
@mock.patch(
411405
"snowflake.connector.ocsp_snowflake.SnowflakeOCSP._fetch_ocsp_response",
412406
side_effect=BrokenPipeError("fake error"),
@@ -429,7 +423,6 @@ def test_ocsp_cache_when_server_is_down(
429423
assert not cache_data, "no cache should present because of broken pipe"
430424

431425

432-
@pytest.mark.flaky(reruns=3)
433426
def test_concurrent_ocsp_requests(tmpdir):
434427
"""Run OCSP revocation checks in parallel. The memory and file caches are deleted randomly."""
435428
cache_file_name = path.join(str(tmpdir), "cache_file.txt")
@@ -474,7 +467,6 @@ def test_ocsp_revoked_certificate():
474467
assert ex.value.errno == ex.value.errno == ER_OCSP_RESPONSE_CERT_STATUS_REVOKED
475468

476469

477-
@pytest.mark.flaky(reruns=3)
478470
def test_ocsp_incomplete_chain():
479471
"""Tests incomplete chained certificate."""
480472
incomplete_chain_cert = path.join(

0 commit comments

Comments
 (0)