Skip to content

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

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

Open
leo-vital opened this issue Apr 21, 2025 · 2 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@leo-vital
Copy link

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.

@leo-vital leo-vital added the bug Something isn't working label Apr 21, 2025
@gastonfournier
Copy link

Hi @leo-vital the honest answer is that this was a conscious decision during the development of this SDK, to keep its dependencies to a minimum. So it currently has a minimum support of some features and it's lagging a bit behind compared with other SDKs. We'd love to receive some contributions here.

@gastonfournier gastonfournier added the help wanted Extra attention is needed label Apr 25, 2025
@gastonfournier
Copy link

@rbtcollins is this something you under your radar?

@gastonfournier gastonfournier moved this from New to For later in Issues and PRs Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: For later
Development

No branches or pull requests

2 participants