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-642635: Remove legacy ocsp cache code #1292

Merged
merged 7 commits into from
Nov 3, 2022

Conversation

sfc-gh-aling
Copy link
Collaborator

@sfc-gh-aling sfc-gh-aling commented Oct 24, 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-642635

  2. 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
  3. Please describe how your code solves the related issue.

  • Remove SSD code which is never used
  • Refactor the OCSP_CACHE, consolidating the old design with the new design:
    • one in-memory cache: OCSP_RESPONSE_VALIDATION_CACHE, which caches not only ocsp response, but also the validation result
    • two files: OCSP_RESPONSE_VALIDATION_CACHE which is the dump of the in-memory one, and OCSP_RESPONSE which stores the raw ocsp responses in the same format as downloaded from the snowflake cache service.

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2022

Codecov Report

Merging #1292 (3a94c4a) into main (89a54fc) will increase coverage by 0.57%.
The diff coverage is 84.05%.

@@            Coverage Diff             @@
##             main    #1292      +/-   ##
==========================================
+ Coverage   81.49%   82.07%   +0.57%     
==========================================
  Files          59       59              
  Lines        8562     8386     -176     
  Branches     1275     1240      -35     
==========================================
- Hits         6978     6883      -95     
+ Misses       1277     1196      -81     
  Partials      307      307              
Impacted Files Coverage Δ
src/snowflake/connector/cache.py 88.96% <80.00%> (+1.37%) ⬆️
src/snowflake/connector/ocsp_snowflake.py 76.95% <84.21%> (+5.29%) ⬆️
src/snowflake/connector/ocsp_asn1crypto.py 75.34% <100.00%> (-0.66%) ⬇️
src/snowflake/connector/ssd_internal_keys.py 0.00% <0.00%> (-82.36%) ⬇️
src/snowflake/connector/util_text.py 96.29% <0.00%> (+0.14%) ⬆️
src/snowflake/connector/errors.py 90.32% <0.00%> (+0.53%) ⬆️
src/snowflake/connector/pandas_tools.py 83.33% <0.00%> (+1.03%) ⬆️

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

@sfc-gh-aling sfc-gh-aling marked this pull request as draft October 29, 2022 01:34
@sfc-gh-aling sfc-gh-aling marked this pull request as ready for review October 31, 2022 16:46
src/snowflake/connector/cache.py Outdated Show resolved Hide resolved
src/snowflake/connector/cache.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
src/snowflake/connector/ocsp_snowflake.py Outdated Show resolved Hide resolved
@sfc-gh-aling sfc-gh-aling force-pushed the SNOW-642635-remove-legacy-ocsp-cache-code branch from 1f6429c to 7438a27 Compare November 1, 2022 21:05
@sfc-gh-aling sfc-gh-aling force-pushed the SNOW-642635-remove-legacy-ocsp-cache-code branch from 7438a27 to fcd4786 Compare November 1, 2022 21:08
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.

🚢 🚢

@sfc-gh-aling sfc-gh-aling merged commit b6d752b into main Nov 3, 2022
@sfc-gh-aling sfc-gh-aling deleted the SNOW-642635-remove-legacy-ocsp-cache-code branch November 3, 2022 16:39
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 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