bug: when switching sdk keys; do not use the assignment cache (#83) - #84
Draft
leoromanovsky wants to merge 2 commits into
Draft
bug: when switching sdk keys; do not use the assignment cache (#83)#84leoromanovsky wants to merge 2 commits into
leoromanovsky wants to merge 2 commits into
Conversation
typotter
approved these changes
Nov 20, 2025
typotter
left a comment
Collaborator
There was a problem hiding this comment.
looks good to my non-swift-trained eyes
| } else { | ||
| // Different SDK key, reset the shared instance to create a new one | ||
| // This ensures the assignment cache is cleared when switching environments | ||
| sharedInstance = nil |
Collaborator
There was a problem hiding this comment.
What happens to existing instances? Do they lose any ability to properly function? Would keying the assignment cache on the sdk token be a viable solution here (if more work)?
| // This should pass - no additional logging since we're using the same SDK key | ||
| XCTAssertEqual(loggerSpy.logCount, 1, "Same assignment with same SDK key should not be logged again due to cache (consistent offline/online behavior)") | ||
| } | ||
| } No newline at end of file |
leoromanovsky
added a commit
that referenced
this pull request
Nov 20, 2025
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.
🎟️ Fixes issue
📜 Design Doc: link if applicable
#83
Motivation and Context
Description
How has this been documented?
How has this been tested?