Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-698526: Python connector 2.8.2 infinite loop in OCSP cache validation #1348

Conversation

sfc-gh-aling
Copy link
Collaborator

@sfc-gh-aling sfc-gh-aling commented Nov 23, 2022

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-698526

_getitem should not be overwritten in SFDictFileCache as _getitem is used by load to clean up in-memory expired cache. To resolve the issue, introduce a new non-locking get method in SFDictFileCache to segregate the functionality

  1. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  2. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Copy link
Collaborator

@sfc-gh-mkeller sfc-gh-mkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 🚢

test/unit/test_cache.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

Merging #1348 (502e49f) into main (cbfd6d0) will decrease coverage by 0.31%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1348      +/-   ##
==========================================
- Coverage   82.39%   82.07%   -0.32%     
==========================================
  Files          60       60              
  Lines        8424     8425       +1     
  Branches     1248     1248              
==========================================
- Hits         6941     6915      -26     
- Misses       1174     1202      +28     
+ Partials      309      308       -1     
Impacted Files Coverage Δ
src/snowflake/connector/ocsp_snowflake.py 76.24% <ø> (-1.08%) ⬇️
src/snowflake/connector/cache.py 85.18% <100.00%> (-3.67%) ⬇️
src/snowflake/connector/version.py 100.00% <100.00%> (ø)
src/snowflake/connector/network.py 78.87% <0.00%> (-1.68%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sfc-gh-aling sfc-gh-aling merged commit bd39dc7 into main Nov 24, 2022
@sfc-gh-aling sfc-gh-aling deleted the SNOW-698526-python-connector-2-8-2-infinite-loop-in-ocsp-cache-validation branch November 24, 2022 00:38
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants