Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resetting identity override to environment default not working #139

Open
devneutz opened this issue Jan 3, 2025 · 7 comments
Open

Resetting identity override to environment default not working #139

devneutz opened this issue Jan 3, 2025 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@devneutz
Copy link

devneutz commented Jan 3, 2025

Description

When using Flagsmith's Edge Proxy, the feature property enabled for an identity is not returned correctly in case it has been reset to the environment default. Only a complete restart of the edge proxy will help which seems to indicate an issue with the mem cache.

Steps to reproduce

  1. Create a feature for an environment which is disabled
  2. Overwrite the feature for an identity
  3. Retrieve the feature via Edge Proxy
  4. Reset the feature for the same identity
  5. Retrieve the feature via Edge Proxy

Expected behaviour

The enabled property of the feature should return the default environment value (in this case false).

Observed behaviour

The feature remains true when retrieved via Edge Proxy. Edge API returns the correct value (false).

Impact

Identity overrides can not be used like this since a reset for a specific identity won't work.

Environment

Edge Proxy 2.17 (Docker)

@matthewelwell
Copy link
Contributor

Hi @devneutz , can you provide more information about your set up? If possible please provide your config.json file (you can redact the keys), and also how you are running Flagsmith (SaaS or self-hosted)?

@devneutz
Copy link
Author

devneutz commented Jan 3, 2025

Hi @matthewelwell

Thanks for your immediate reply. I am self-hosting Edge Proxy in a k8s cluster and connecting to Flagsmith SaaS.

My config looks like this:

{
    "environment_key_pairs": [
        {
            "server_side_key": "ser.REDACTED",
            "client_side_key": "REDACTED"
        }
    ],
    "api_poll_frequency": 600,
    "logging": {
        "log_level": "DEBUG",
        "log_format": "json"
    },
    "endpoint_caches": {
        "flags": {
            "use_cache": false
        },
        "identities": {
            "use_cache": false
        }
    }
}

EDIT: What I have realized is that if you change the feature on the identity itself (i.e. turn it off and on) it does work flawlessly. Only on resetting to the environment default, the Edge Proxy will give me the wrong / old value.

@matthewelwell
Copy link
Contributor

Ok, thanks for the additional information @devneutz . Just to check, you have waited more than 600 seconds (your poll interval) after resetting the value before verifying if the override has been reset?

@devneutz
Copy link
Author

devneutz commented Jan 3, 2025

@matthewelwell Yes :) For testing purposes I used a much lower value.

@matthewelwell
Copy link
Contributor

Sorry, I had to check 😄

Thanks for all the info, we'll take a look and get back to you.

@matthewelwell matthewelwell added the bug Something isn't working label Jan 3, 2025
@devneutz
Copy link
Author

Hi @khvn26, are there any news? 😃

@matthewelwell
Copy link
Contributor

Hi @devneutz , I'm afraid there's no update on this one yet but it's in our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants