-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat: Add initial delay for polling feature configuration #2257
feat: Add initial delay for polling feature configuration #2257
Conversation
✅ Deploy Preview for go-feature-flag-doc-preview canceled.
|
@thomaspoignant Do this library need code duplication check on tests, because it is falling on already existing tests? Edit: |
@samuolis thanks for your pull request, it fixes an important problem from the provider. I am currently away (taking some vacation), but I will look closely to your PR early September and we will be able to release a new version of the provider with this addition. For the code duplication, this should not be a problem for test, thanks for the sonar fix 🙏 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2257 +/- ##
=======================================
Coverage 86.02% 86.02%
=======================================
Files 102 102
Lines 3743 3743
=======================================
Hits 3220 3220
Misses 399 399
Partials 124 124 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @samuolis,
thanks for your contribution! I appreciate you taking the time to submit a pull request.
I'd like to understand a bit more about the context of your changes in this PR. While reviewing the code, I noticed that the initial API call to retrieve flags happens before polling starts.
Line 58 in 46aeea6
val bulkEvaluationStatus = evaluateFlags(initialContext ?: ImmutableContext()) |
This design approach ensures that flags are available immediately, even before the first polling cycle.
Could you elaborate on the specific issue you're trying to address with this pull request? Understanding your thought process will help me provide more relevant feedback.
If you have any questions or need further clarification on the current implementation, feel free to ask! I'm happy to discuss this further.
@@ -2,7 +2,7 @@ sonar.organization=thomaspoignant | |||
sonar.projectKey=thomaspoignant_go-feature-flag | |||
sonar.projectName=GO Feature Flag GitHub action | |||
sonar.sources=. | |||
sonar.exclusions=**/*_test.go, examples/**, openfeature/provider_tests/**, **/test_*.py, openfeature/providers/kotlin-provider/gofeatureflag=kotlin-provider/src/test/**, cmd/relayproxy/helm-charts/** | |||
sonar.exclusions=**/*_test.go, examples/**, openfeature/provider_tests/**, **/test_*.py, openfeature/providers/kotlin-provider/gofeatureflag-kotlin-provider/src/test/**, cmd/relayproxy/helm-charts/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch 👌
I want to fast here 🤦
Sorry for such a delay, I missed this line somehow. I now see what was the problem, somehow the first API call was getting cancelled, now it works perfectly |
Description
pollingDelayInMillis
in initialize options, to declare delay for the first request of feature flagsThis should solve the issue of getting feature flags before the first polling even happened (Default delay is 5 mins, it is okay for polling but not okay for waiting for initial data)
Checklist
README.md
and/website/docs
)