Skip to content

custom strategies that aren't configured into the client are hard to debug #51

@rbtcollins

Description

@rbtcollins

Describe the bug

This log shows a test with a custom strategy that hasn't been enabled using .strategy(): it requires a TRACE level log statement to even tell that that is whats happened.

2022-09-27T20:12:34.518Z TRACE [unleash_api_client::client] memoize: start with 1 features
2022-09-27T20:12:34.518Z TRACE [unleash_api_client::client] memoize: swapped memoized state in
2022-09-27T20:12:34.518Z DEBUG [unleash_api_client::client] poll: waiting 500ms
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test default false, context Some(Context { user_id: None, session_id: None, remote_address: None, properties: {"projectId": "project", "cluster": "clustername"}, app_name: "app", environment: "clustername" })
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test default false, context Some(Context { user_id: None, session_id: None, remote_address: None, properties: {"projectId": "project", "cluster": "clustername"}, app_name: "app", environment: "clustername" })
2022-09-27T20:12:35.013Z TRACE [unleash_api_client::client] is_enabled: feature project_test has no strategies: enabling
feature 'project_test' is true

We should probably log the silent dropping of unknown strategies much more visibly.

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

No response

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

No response

Hosting type

No response

SDK information (language and version)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions