go-feature-flag
go-feature-flag copied to clipboard
feat: Add initial delay for polling feature configuration
Description
- Added
pollingDelayInMillisin initialize options, to declare delay for the first request of feature flags - Added tests to cover this case
This 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
- [x] I have tested this code
- [x] I have added unit test to cover this code
- [x] I have updated the documentation (
README.mdand/website/docs) - [x] I have followed the contributing guide
Deploy Preview for go-feature-flag-doc-preview canceled.
| Name | Link |
|---|---|
| Latest commit | e7202d3311c149f8e4c62131752d89b9bc8f279c |
| Latest deploy log | https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/66d6b83c86ba260008f03ea0 |
@thomaspoignant Do this library need code duplication check on tests, because it is falling on already existing tests?
Edit: Changed sonar config to include those files, there was typo
@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 Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 86.02%. Comparing base (
eec11f3) to head (e7202d3). Report is 58 commits behind head on main.
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
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