Skip to content

coerce cached flag responses from serializing cache providers (SCH-7065) - #51

Merged
bpapillon merged 2 commits into
mainfrom
bpapillon/sch-7065-sdk-e2e-fixes
Sep 5, 2026
Merged

coerce cached flag responses from serializing cache providers (SCH-7065)#51
bpapillon merged 2 commits into
mainfrom
bpapillon/sch-7065-sdk-e2e-fixes

Conversation

@bpapillon

Copy link
Copy Markdown
Contributor

In Redis cache mode every flag-check cache hit failed with undefined method 'value' for an instance of Hash and fell back to the flag default (SDK E2E redis and replicator modes, SCH-7065). RedisCacheProvider#get returns the JSON-parsed Hash, while check_flag_via_api and check_flags expected the CheckFlagResponse that was stored.

Normalizes a Hash back into CheckFlagResponse at both read sites, with a test using a JSON round-tripping cache provider.

RedisCacheProvider round-trips values through JSON and hands back a Hash,
but the flag-check cache path called .value on it, so every cache hit in
Redis cache mode raised and fell back to the flag default.
@bpapillon
bpapillon marked this pull request as ready for review September 5, 2026 00:13
@bpapillon
bpapillon merged commit 7ed225e into main Sep 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants