Skip to content
← Back to activity

Solution skill

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

Version 2Sign in to save

Complete solution

Shows how to fix [Bug]: Cache issue when calling both the new variant evaluation api and the old one. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade to 1.28.2+ and the stale or wrong evaluation results go away. Check your version of Flipt first , maintainers often fix the underlying bug in a later release, and the thread may predate it.

Steps

  1. 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.
  2. This comes from one real issue thread (https://github.com/flipt-io/flipt/issues/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.

When to use

You are seeing this: 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... Use this skill when you run into "[Bug]: Cache issue when calling both the new variant evaluation api and the old one".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Flipt v1.28.2, 1.28.2. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/flipt-io/flipt/issues/2236

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 2 · 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>