Skip to content

Entitlement verification: Return current call verification result over cached version#842

Merged
tonidero merged 2 commits into
entitlements-verificationfrom
entitlement-verification-cache-verification-errors
Mar 7, 2023
Merged

Entitlement verification: Return current call verification result over cached version#842
tonidero merged 2 commits into
entitlements-verificationfrom
entitlement-verification-cache-verification-errors

Conversation

@tonidero

@tonidero tonidero commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

Description

This PR makes sure we expose the current call verification result over the cached version. We shouldn't be storing verification errors in the etag cache. Also, we plan to clear the cache when verification mode is enabled, so we shouldn't have NOT_REQUESTED values either, so the etag cache should only contain successful values

@tonidero tonidero added the pr:fix A bug fix label Mar 6, 2023
@tonidero tonidero marked this pull request as ready for review March 6, 2023 12:35
@tonidero tonidero requested a review from a team March 6, 2023 12:35
@codecov

codecov Bot commented Mar 6, 2023

Copy link
Copy Markdown

Codecov Report

Merging #842 (a88f8d6) into entitlement-verification-rename-not-verified-to-not-requested (1a4c08a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                                      Coverage Diff                                       @@
##           entitlement-verification-rename-not-verified-to-not-requested     #842   +/-   ##
==============================================================================================
  Coverage                                                          82.61%   82.61%           
==============================================================================================
  Files                                                                137      137           
  Lines                                                               4498     4499    +1     
  Branches                                                             584      585    +1     
==============================================================================================
+ Hits                                                                3716     3717    +1     
  Misses                                                               562      562           
  Partials                                                             220      220           
Impacted Files Coverage Δ
...enuecat/purchases/common/networking/ETagManager.kt 97.95% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Improved this test to make sure we don't check with etag manager when verification errors and verification mode is enforced.

@tonidero tonidero marked this pull request as draft March 6, 2023 14:33
@tonidero

tonidero commented Mar 6, 2023

Copy link
Copy Markdown
Contributor Author

Moving back to draft after the latest conversation in slack

@tonidero tonidero force-pushed the entitlement-verification-cache-verification-errors branch from 1614b23 to 001763c Compare March 6, 2023 14:40
@tonidero tonidero marked this pull request as ready for review March 6, 2023 14:44
@tonidero tonidero changed the title Entitlement verification: Cache verification failures and return most restrictive verification result Entitlement verification: Return current call verification result over cached version Mar 6, 2023
Base automatically changed from entitlement-verification-rename-not-verified-to-not-requested to entitlements-verification March 7, 2023 17:28
@tonidero tonidero force-pushed the entitlement-verification-cache-verification-errors branch from a88f8d6 to 2c0b25f Compare March 7, 2023 17:29
@tonidero tonidero merged commit 7f5060c into entitlements-verification Mar 7, 2023
@tonidero tonidero deleted the entitlement-verification-cache-verification-errors branch March 7, 2023 17:29
tonidero added a commit that referenced this pull request Mar 15, 2023
…r cached version (#842)

### Description
This PR makes sure we expose the current call verification result over
the cached version. We shouldn't be storing verification errors in the
etag cache. Also, we plan to clear the cache when verification mode is
enabled, so we shouldn't have `NOT_REQUESTED` values either, so the etag
cache should only contain successful values
@tonidero tonidero mentioned this pull request Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants