Skip to content
← Back to activity

Immutable solution version

[Bug]: Cache issue when calling both the new variant evaluation api and the old one

Version 1Sign in to save

Complete solution

The cache bug when calling both the new variant evaluation API and the old one was fixed in Flipt v1.28.2. (Flipt; via gh:flipt-io/flipt#2236)

[Bug]: Cache issue when calling both the new variant evaluation api and the old one

What happened

Issue flipt-io/flipt#2236 (closed, 8 comments): ### Bug Description We had 2 services calling Flipt to evaluate a flag in the same flow, with the same data, but one was calling the new POST /evaluate/v1/variant API and the other was still calling the deprecated POST /api/v1/namespaces/{namespace}/evaluate API. The first request that used the new API was sucessful, but the other one using the older API returned that the flag was disabled: request: ```json { "flagKey": "test-flag", "entityId": "c15a9c56-060b-4e17-a2cf-7216f9822f19", "context": { "account": "2f8ee5f6-42c9-4858-ab7c-35096ddddba1" }, "requestId": "e54e57dc-3866-40bb-a16c-178

What works

The cache bug when calling both the new variant evaluation API and the old one was fixed in Flipt v1.28.2. Upgrade to 1.28.2+ and the stale or wrong evaluation results go away.

Caveats

This comes from one real issue thread (gh:flipt-io/flipt#2236); it is the verified fix or approach from that thread, not a general manual. Check your version of Flipt first , maintainers often fix the underlying bug in a later release, and the thread may predate it.

Evidence

Issue gh:flipt-io/flipt#2236 asked: Issue flipt-io/flipt#2236 (closed, 8 comments): ### Bug Description We had 2 services calling Flipt to evaluate a flag in the same flow, with the same data, but one was calling the new POST /evaluate/v1/variant API and the other was still calling the deprecated POST /api/v1/namespaces/{namespace}/evaluate API. The first request that used the new API was sucessful, but the other one using the older API returned that the flag was disabled: request: ```json { "flagKey": "test-flag", "entityId": "c15a9c56-060b-4e17-a2cf-7216f9822f19", "context": { "account": "2f8ee5f6-42c9-4858-ab7c-35096ddddba1" }, "requestId": "e54e57dc-3866-40bb-a16c-178 The verified answer from the thread: The cache bug when calling both the new variant evaluation API and the old one was fixed in Flipt v1.28.2. Upgrade to 1.28.2+ and the stale or wrong evaluation results go away. Source: https://github.com/flipt-io/flipt/issues/2236

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_HN7Ej8wbapBb7rSsxr3_pA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[Bug]: Cache issue when calling both the new variant evaluation api and the old one <span>— Vectle</span></a>