https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
s

silly-crayon-99948

12/17/2023, 3:50 PM
I noticed my old flags are marked “stale” even though they are simple on/off flags with no rules, but maybe now a rule is required, like opting in all users or something? Previously created flags still work fine.
f

future-teacher-7046

12/17/2023, 4:02 PM
The
stale
mark is just something we show if a flag hasn't been updated in a while. Just a reminder to check and see if it's still something you need or not. It doesn't affect anything else. You can click the warning icon to disable staleness checks for a specific feature if you want.
s

silly-crayon-99948

12/17/2023, 4:04 PM
Great I am glad we can disable
f

future-teacher-7046

12/17/2023, 4:05 PM
I see in your screenshot that the feature is only toggled on for the
dev
environment. Is your application using a dev client key? If it's using any of the other environments instead, the feature will be evaluated to
null
⬆️ 1
s

silly-crayon-99948

12/17/2023, 4:06 PM
Thank you for drawing my attention there, I am working in the dev environment as always. Any other common gotchas I might be missing?
We have always used :: for separators in our feature names
api::2022-12-26::release::use-new-feature
I noticed colons were not listed as acceptable characters in your docs, so I replaced with underscores, but no luck.
f

future-teacher-7046

12/17/2023, 4:12 PM
Can you share the exact code you are using to check the feature value for this feature?
s

silly-crayon-99948

12/17/2023, 4:19 PM
Copy code
import omit from "lodash/omit";

import {getFeatureValue} from "@blackowl/feature-client";

export const handleSaveBasedOnLeaseStatus = async ({}) => {
  console.log(
    "getfromhandleSaveBasedOnLeaseStatus",
    getFeatureValue(
      "platform::2023-05-02::release::working-flag",
    ),
  );
  console.log(
    "getNewFlag",
    getFeatureValue(
      "api::2023-12-17::release::not-working",
    ),
  );
  console.log(
    "getNewFlagWithUnderscores",
    getFeatureValue(
      "api_2023-12-17_release_not_working",
    ),
  );
I had to delete some code for security, but this is where I am console logging flags 2,3, and 4 from the logs screen shot. The first flag is an older flag and is working properly. The other two I created an hour ago or so.
Do you want the feature-client code. We know it works, but I can send it.
f

future-teacher-7046

12/17/2023, 4:22 PM
I would double check the feature keys in your code and make sure they 100% match what's in the GrowthBook UI. I don't see a feature with id
api_2023-12-17_release_not_working
in your account at all for example.
s

silly-crayon-99948

12/17/2023, 4:22 PM
Yeah, sorry I changed the name for security, but now I realize I already sent it in the log screenshot.
I copy and pasted all the names so for sure they are correct.
If there is no gotcha coming right to your mind, I will have one of the other dev try to create one and see what I can find out.
I really appreciate your time.
f

future-teacher-7046

12/17/2023, 4:25 PM
On the GrowthBook client instance, there is a
getFeatures()
method you can call and console.log it:
Copy code
console.log(growthbook.getFeatures())
You can check if the feature is listed there
s

silly-crayon-99948

12/17/2023, 4:25 PM
Good call… let me try that real quick
f

future-teacher-7046

12/17/2023, 4:26 PM
It should look something like this based on your screenshot:
Copy code
{
  "api_2023-...": {
    "defaultValue": true
  }
}
s

silly-crayon-99948

12/17/2023, 4:42 PM
The new ones I created are on the list with the default value set to true.
Copy code
'api::2023-12-16::backend-validations-costs-standards-interconnections': { defaultValue: true },
  'api::2023-12-17::release::be-validations-costs-all-standards': { defaultValue: true },
  'api_2023-12-17_release_be-validations-costs-all-standards': { defaultValue: true }
So big surprise, the problem is on my end 🙂
I will continue debugging with this assurance that they are coming in properly from gb. Thanks again for your help.
Really weird that the old one shows up and the new one doesn’t 🤔
4 Views