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: only flush analytics once if requested concurrently #148

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

rolodato
Copy link
Member

This bug was reported by a customer - see the added test for an example on how to reproduce it. There might be a smarter way to write the test, haven't used jest much before.

The bugfix is essentially a mutex to ensure that we're only ever making one request at a time to flush analytics data.

Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

Looking good!

@rolodato rolodato merged commit 3b3a078 into main Apr 29, 2024
1 check passed
@rolodato rolodato deleted the fix/concurrent-analytics-flush branch April 29, 2024 15:41
renovate bot referenced this pull request in open-feature/playground Jul 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [flagsmith-nodejs](http://flagsmith.com/)
([source](https://togithub.com/Flagsmith/flagsmith-nodejs-client)) |
[`3.3.0` ->
`3.3.3`](https://renovatebot.com/diffs/npm/flagsmith-nodejs/3.3.0/3.3.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/flagsmith-nodejs/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/flagsmith-nodejs/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/flagsmith-nodejs/3.3.0/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/flagsmith-nodejs/3.3.0/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Flagsmith/flagsmith-nodejs-client (flagsmith-nodejs)</summary>

###
[`v3.3.3`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.3.3)

[Compare
Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.3.2...v3.3.3)

#### What's Changed

- Cancel timeout when it is no longer needed by
[@&#8203;wheineman-sunrun](https://togithub.com/wheineman-sunrun) in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/141](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/141)

#### New Contributors

- [@&#8203;wheineman-sunrun](https://togithub.com/wheineman-sunrun) made
their first contribution in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/141](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/141)

**Full Changelog**:
Flagsmith/flagsmith-nodejs-client@v3.3.2...v3.3.3

###
[`v3.3.2`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.3.2)

[Compare
Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.3.1...v3.3.2)

#### What's Changed

- fix: handle null traits for regex evaluations by
[@&#8203;matthewelwell](https://togithub.com/matthewelwell) in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/152](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/152)

**Full Changelog**:
Flagsmith/flagsmith-nodejs-client@v3.3.1...v3.3.2

###
[`v3.3.1`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.3.1)

[Compare
Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.3.0...v3.3.1)

#### What's Changed

- fix: only flush analytics once if requested concurrently by
[@&#8203;rolodato](https://togithub.com/rolodato) in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/148](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/148)
- fix: error evaluating CONTAINS / NOT_CONTAINS for null traits by
[@&#8203;matthewelwell](https://togithub.com/matthewelwell) in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/150](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/150)
- Bump version 3.3.1 by
[@&#8203;matthewelwell](https://togithub.com/matthewelwell) in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/151](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/151)

#### New Contributors

- [@&#8203;rolodato](https://togithub.com/rolodato) made their first
contribution in
[https://github.com/Flagsmith/flagsmith-nodejs-client/pull/148](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/148)

**Full Changelog**:
Flagsmith/flagsmith-nodejs-client@v3.3.0...v3.3.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/open-feature/playground).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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