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

fix: evaluationContextEnrichement with key env overridden by empty string #2367

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

thomaspoignant
Copy link
Owner

Description

We were overriding the context with env even if nothing was provided in the configuration causing an issue, when an evaluationContextEnrichement with key env was provided.

In that case, the actual value was overridden by an empty string.

This PR fixes the issue and adds an order of preference Environment has priority against the evaluationContextEnrichement,

Original issue reported in slack.

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

Copy link

netlify bot commented Sep 18, 2024

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

Name Link
🔨 Latest commit ef6ea19
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/66eb095b7bd3d40008af814a

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.08%. Comparing base (ac6e527) to head (ef6ea19).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2367   +/-   ##
=======================================
  Coverage   86.07%   86.08%           
=======================================
  Files         102      102           
  Lines        3771     3773    +2     
=======================================
+ Hits         3246     3248    +2     
  Misses        400      400           
  Partials      125      125           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Sep 18, 2024

@thomaspoignant thomaspoignant merged commit f3d44ea into main Sep 18, 2024
22 checks passed
@thomaspoignant thomaspoignant deleted the fix-context-enrichment-env branch September 18, 2024 17:19
@thomaspoignant thomaspoignant changed the title fix: evaluationContextEnrichement with key env overriden by empty string fix: evaluationContextEnrichement with key env overridden by empty string Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants