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

Feature/add event source field #1105

Merged
merged 18 commits into from
Sep 28, 2023
Merged

Feature/add event source field #1105

merged 18 commits into from
Sep 28, 2023

Conversation

andrebenedetti
Copy link
Contributor

@andrebenedetti andrebenedetti commented Sep 25, 2023

Description

Added Source field on FeatureEvent

Source is set to "PROVIDER_CACHE" for events received through the CollectEvalData endpoint. Otherwise, it is set to "SERVER"

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking changes (change that is not backward-compatible and/or changes current functionality)

Closes issue(s)

Resolve #978

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

@andrebenedetti
Copy link
Contributor Author

hey, @thomaspoignant, please have a look whenever you have some time =)

I failed to see my changes to the docs locally 🤔 , also I'm taking a look at the failed pipeline steps

@netlify
Copy link

netlify bot commented Sep 25, 2023

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

Name Link
🔨 Latest commit 06ece14
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/65152889e776980008994f38

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #1105 (06ece14) into main (6dad179) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1105      +/-   ##
==========================================
+ Coverage   88.52%   88.54%   +0.01%     
==========================================
  Files          69       69              
  Lines        3155     3159       +4     
==========================================
+ Hits         2793     2797       +4     
  Misses        292      292              
  Partials       70       70              
Files Coverage Δ
cmd/relayproxy/config/config.go 94.39% <ø> (ø)
cmd/relayproxy/controller/collect_eval_data.go 100.00% <100.00%> (ø)
exporter/common.go 100.00% <ø> (ø)
exporter/feature_event.go 100.00% <100.00%> (ø)
exporter/fileexporter/exporter.go 83.56% <ø> (ø)
exporter/logsexporter/exporter.go 85.71% <100.00%> (ø)
feature_flag.go 96.92% <ø> (ø)
variation.go 98.26% <100.00%> (+<0.01%) ⬆️

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

@thomaspoignant
Copy link
Owner

I haven’t check the PR yet but if you want to have swagger CI to pass you will have to generate the new swagger schema.

To do this please run make swagger and commit the files.

Copy link
Owner

@thomaspoignant thomaspoignant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, @andrebenedetti this is a great addition to GO Feature Flag.

I've only 1 small feedback to be sure we are not overriding the field if it is already set in the event. We should also probably add a test for this use-case.

cmd/relayproxy/controller/collect_eval_data.go Outdated Show resolved Hide resolved
exporter/logsexporter/exporter.go Show resolved Hide resolved
@andrebenedetti
Copy link
Contributor Author

@thomaspoignant good points

I'll make those changes later today. Thanks for reviewing

@thomaspoignant
Copy link
Owner

Thanks for the awesome work on this PR.
I will merge it and it will be available in the next version of GO Feature Flag.

@sonarcloud
Copy link

sonarcloud bot commented Sep 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 c06bf43 into thomaspoignant:main Sep 28, 2023
23 checks passed
@andrebenedetti
Copy link
Contributor Author

andrebenedetti commented Sep 28, 2023

Thanks for the awesome work on this PR. I will merge it and it will be available in the next version of GO Feature Flag.

🎆 thanks for the support
It was nice to learn more about the repo
We use LaunchDarkly at work, but go-feature-flag would cover all our needs if we were to switch :). I'll let the team know about it and maybe one day we'll migrate if it aligns with the business goals

@thomaspoignant
Copy link
Owner

Oh yes, let me know.
Launchdarkly is way more complete, but sometimes it is too much (and also expensive 😉).

In any case I would be happy to get your feedback about the repo.

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) Adding event source field
2 participants