growthbook / growthbook-sdk-java

The Java SDK for GrowthBook (JVM, Android)
https://docs.growthbook.io/lib/java
MIT License
7 stars 10 forks source link

Constant throwing `evaluateFeature: circular dependency detected` #72

Open vasilii-bolgar-tr opened 2 weeks ago

vasilii-bolgar-tr commented 2 weeks ago

Hello everyone!

Engineers in my company discovered the following error that is throwing constantly (unconditionally) to the logs of multiple applications. We assume it's started since Release 0.9.3.

This line is to blame - https://github.com/growthbook/growthbook-sdk-java/blame/81b9295de6e7ffa17977005f9b4dc34538e37b10/lib/src/main/java/growthbook/sdk/java/FeatureEvaluator.java#L50

Would be nice if you consider fixing this and help us in keeping logs clean.

Best regards!

vazarkevych commented 2 weeks ago

Hi @vasilii-bolgar-tr, we will check that and write to you asap about this issue.

vazarkevych commented 2 weeks ago

Hi, @vasilii-bolgar-tr we have already fixed that issue. We will add a pull request and make a new release with that fix. I will write to you when the new release is available.

vasilii-bolgar-tr commented 2 weeks ago

Hello, @vazarkevych

Thanks for the answer. Looking forward to new release 👍

Bohdan-Kim commented 1 week ago

In order not to wait for a new release, try this snapshot:

    dependencies {
            implementation 'com.github.growthbook:growthbook-sdk-java:issues~72-SNAPSHOT'
    }
vazarkevych commented 1 week ago

Hi, here is a pull request for this issue link

vasilii-bolgar-tr commented 1 week ago

Hello @vazarkevych! Thank you!

Let me confirm that the circular dependency issue is gone.

I can close the issue. However, the lib is still printing the following extensively.

{"@timestamp":"2024-06-25T15:58:16.303371375Z","@version":"sl1","message":"\n\nAttributes = {}","logger_name":"growthbook.sdk.java.FeatureEvaluator","thread_name":"scheduling-1","level":"INFO","trace_id":"9feddb222948fa336976d3bf3aefd352","trace_flags":"01","span_id":"bb1ae22ffb18637f"}

So in our case we cannot unmute FeatureEvaluator logger. Because it keeps spamming a lot.

vazarkevych commented 1 week ago

Hi, @vasilii-bolgar-tr . Thank you for providing that information. We will take a look and provide a solution. I will write to you as soon as we make the change.

Bohdan-Kim commented 10 hours ago

Hello @vasilii-bolgar-tr! We've removed user's attributes logging in this pull request.