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: Notifier should fire during runtime (if isInit is false) #2569

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

8ma10s
Copy link
Contributor

@8ma10s 8ma10s commented Oct 24, 2024

Description

This is a bug fix for #2534

#2534 had an incorrect logic of NOT calling notifier when the status is not set to isInit (=upon polling).
It should:

  • NOT call notifier only if isInit && DisableNotifierOnInit are BOTH true
  • call the notifier in any other cases

Closes issue(s)

Copy link

netlify bot commented Oct 24, 2024

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

Name Link
🔨 Latest commit d917efe
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/671b42ea39b9b60008b4a97f

@8ma10s 8ma10s changed the title Fix: Notifier should fire during runtime (if isInit is false) fix: Notifier should fire during runtime (if isInit is false) Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.48%. Comparing base (209c7ad) to head (d917efe).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2569   +/-   ##
=======================================
  Coverage   85.48%   85.48%           
=======================================
  Files         100      100           
  Lines        4444     4444           
=======================================
  Hits         3799     3799           
  Misses        516      516           
  Partials      129      129           

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

@8ma10s
Copy link
Contributor Author

8ma10s commented Oct 24, 2024

@thomaspoignant sorry about that. I think the code currently doesn't call the notifiers if isInit is false, which probably affects all users.

As a hotfix, I've created a PR that does just the fix of the logic.

@8ma10s 8ma10s marked this pull request as ready for review October 25, 2024 00:03
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.

oh good catch, I missed this one.
Let me release the fix.

@thomaspoignant thomaspoignant merged commit 1f5b792 into thomaspoignant:main Oct 25, 2024
15 checks passed
Copy link

sonarcloud bot commented Oct 25, 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