Skip to content

DATE_AFTER and DATE_BEFORE operators are not supported by this SDK. #97

@leo-vital

Description

@leo-vital

Describe the bug

When trying to use this SDK, I was faced with an issue when retrieving the features.

The debug logs only had something like this: poll: failed to retrieve features. Not a very helpful log. So I ran my service locally with a vendored version of the SDK so I could change its code and log the error, and this is what I saw:

poll: failed to retrieve features: reqwest::Error { kind: Decode, source: Error("unknown variant `DATE_AFTER`, expected `IN` or `NOT_IN`", line: 1, column: 6347) }

And after looking into it a little bit, it turns out that this seems to be a case of the SDK not supporting some operators that we use in Unleash. So for the SDK to work properly, this would have to be supported.

Steps to reproduce the bug

  1. Have an Unleash feature toggle with a currentTime constraint that uses either the DATE_BEFORE or the DATE_AFTER operators.
  2. Run the poll_for_updates() function of this SDK.

Expected behavior

The polling should work properly.

Logs, error output, etc.

reqwest::Error { kind: Decode, source: Error("unknown variant `DATE_AFTER`, expected `IN` or `NOT_IN`", line: 1, column: 6347) }

Screenshots

No response

Additional context

No response

Unleash version

5.4.2

Subscription type

None

Hosting type

Self-hosted

SDK information (language and version)

Tried running it as a server-side SDK, in the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    For later

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions