Skip to content
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

Add jitter to accept randomization of the retrieval time #943

Merged
merged 5 commits into from
Jul 28, 2023
Merged

Conversation

thomaspoignant
Copy link
Owner

@thomaspoignant thomaspoignant commented Jul 28, 2023

Description

Adding an option to avoid having true periodicity when retrieving your flags.
It is useful to avoid having spike on your flag configuration storage in case your application is starting multiple instances at the same time.

We ensure a deviation that is maximum + or - 10% of your polling interval.
Default: false

Changes include

  • New feature (non-breaking change that adds functionality)

Closes issue(s)

Resolve #942

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for go-feature-flag-doc-preview canceled.

Name Link
🔨 Latest commit ee5915d
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/64c3f006785db70008dfef13

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #943 (ee5915d) into main (19286b6) will increase coverage by 0.01%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##             main     #943      +/-   ##
==========================================
+ Coverage   89.50%   89.52%   +0.01%     
==========================================
  Files          66       66              
  Lines        3002     3016      +14     
==========================================
+ Hits         2687     2700      +13     
- Misses        257      258       +1     
  Partials       58       58              
Files Changed Coverage Δ
cmd/relayproxy/config/config.go 94.39% <ø> (ø)
cmd/relayproxy/service/gofeatureflag.go 62.17% <0.00%> (-0.33%) ⬇️
config.go 100.00% <ø> (ø)
background_updater.go 100.00% <100.00%> (ø)
feature_flag.go 96.92% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kodiakhq kodiakhq bot merged commit 696fa88 into main Jul 28, 2023
22 checks passed
@kodiakhq kodiakhq bot deleted the jitter branch July 28, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(feature) Introduce a jitter on the time to retrieve configuration file
1 participant