uid2: add the refreshStaleUid2s stale-token loop - #333
Draft
mosherBT wants to merge 1 commit into
Draft
Conversation
PRODUCT-3938
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The protocol client (#328) and cache apply (#329) exist, but nothing strings them together.
mergeCache(#330) returnsstaleUid2swith nowhere to send them.ClickUp Task ID: PRODUCT-3938
What Changed
refreshStaleUid2s(config, staleEids)inlib/addons/uid2-refresh.ts— for each stale EID: guard viagetRefData, refresh against the operator, apply the outcome to the cache. Sequential, per-EID try/catch, failures logged through theoptableDebug-gateddebugLog; never throws into the host page.uid2-refresh.mdsection;eid-cache.mdnow points itsstaleUid2soutput here.How to Test
Unit tests cover: end-to-end refresh (cache rewritten, event sent), opt-out eviction, EIDs without usable
_refskipped, network failure and undecryptable response both resolving without a throw and leaving the cache untouched, empty list no-op.Notes
Stacked on eidCache: add merging targeting responses to core #330 (
migrate-eid-cache-merge) forgetRefData/CachedEid; retarget to master after it merges.Completes the addon surface for PRODUCT-3938; page-load wiring is adoption in the wrappers.
Breaking change
Requires release