openflagr/flagr

Why evaluation response does not return a boolean value?

anaamnizami opened this issue · 2 comments

Is there any specific reason evaluation response does not return a boolean flag, and we get a string message that too deeply nested?

{
  "evalContext": {
    "enableDebug": true,
    "entityContext": {
      "email": "jhk"
    },
    "entityID": "a1234",
    "entityType": "report",
    "flagID": 1,
    "flagKey": "kmmcd1nsd6ze56chh"
  },
  "evalDebugLog": {
    "segmentDebugLogs": [
      {
        "msg": "matched all constraints. rollout no. there's no distribution set",
        "segmentID": 2
      }
    ]
  },
  "flagID": 1,
  "flagKey": "kmmcd1nsd6ze56chh",
  "flagSnapshotID": 12,
  "segmentID": 2,
  "timestamp": "2021-11-12T23:58:16Z"
}

Stale issue message

you can just check the 'variantKey' or 'variantID' from the response, if they are there, which means that the flag evaluation is good.