Skip to content

FFM-9097 Don't set global Axios timeout #114

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

Merged
merged 14 commits into from
May 2, 2024
Merged

FFM-9097 Don't set global Axios timeout #114

merged 14 commits into from
May 2, 2024

Conversation

erdirowlands
Copy link
Contributor

What

  • No longer sets global timeout for Axios which would affect other instances of Axios in a user's application.
  • Creates a custom Axios instance setting options for SaaS or On-prem, with a user defined timeout from Options. The timeout will default to 30000ms if not set.

Testing

Timeout configuration:

  • Timeout not set by user defaults 30000ms:
    Screenshot 2024-05-02 at 14 05 57

  • Timeout set to 40000ms
    Screenshot 2024-05-02 at 14 05 36

Requests:

  • All requests to SaaS work correctly: init/polling/streaming/metrics
  • On prem, not explictiy tested but loaded in CA file and observed that the custom Axios instance used it.

@@ -1 +1 @@
export const VERSION = '1.7.0';
export const VERSION = '1.8.0';
Copy link
Contributor Author

@erdirowlands erdirowlands May 2, 2024

Choose a reason for hiding this comment

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

The version was bumped to 1.8.0 in the last PR and has not been released yet. We forgot to update the version here in that PR.
Therefore I haven't also bumped the minor version in this PR in package.json

@erdirowlands erdirowlands merged commit d73ab3e into main May 2, 2024
1 check passed
@erdirowlands erdirowlands deleted the FFM-9097 branch May 2, 2024 17:15
renovate bot referenced this pull request in open-feature/playground Jul 27, 2024
#331)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@harnessio/ff-nodejs-server-sdk](https://docs.harness.io/category/vjolt35atg-feature-flags)
([source](https://togithub.com/harness/ff-nodejs-server-sdk)) | [`1.7.0`
->
`1.8.2`](https://renovatebot.com/diffs/npm/@harnessio%2fff-nodejs-server-sdk/1.7.0/1.8.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@harnessio%2fff-nodejs-server-sdk/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@harnessio%2fff-nodejs-server-sdk/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@harnessio%2fff-nodejs-server-sdk/1.7.0/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@harnessio%2fff-nodejs-server-sdk/1.7.0/1.8.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>harness/ff-nodejs-server-sdk
(@&#8203;harnessio/ff-nodejs-server-sdk)</summary>

###
[`v1.8.2`](https://togithub.com/harness/ff-nodejs-server-sdk/releases/tag/1.8.2)

[Compare
Source](https://togithub.com/harness/ff-nodejs-server-sdk/compare/1.8.1...1.8.2)

#### What's Changed

- FFM-11656 Sort AND/OR rules when caching group instead of during an
evaluation call, which could result in latency if a group is large by
[@&#8203;erdirowlands](https://togithub.com/erdirowlands) in
[https://github.com/harness/ff-nodejs-server-sdk/pull/117](https://togithub.com/harness/ff-nodejs-server-sdk/pull/117)

**Full Changelog**:
harness/ff-nodejs-server-sdk@1.8.1...1.8.2

###
[`v1.8.1`](https://togithub.com/harness/ff-nodejs-server-sdk/releases/tag/1.8.1)

[Compare
Source](https://togithub.com/harness/ff-nodejs-server-sdk/compare/1.8.0...1.8.1)

#### What's Changed

- FFM-11673 Patch braces CVE by
[@&#8203;erdirowlands](https://togithub.com/erdirowlands) in
[https://github.com/harness/ff-nodejs-server-sdk/pull/116](https://togithub.com/harness/ff-nodejs-server-sdk/pull/116)

**Full Changelog**:
harness/ff-nodejs-server-sdk@1.8.0...1.8.1

###
[`v1.8.0`](https://togithub.com/harness/ff-nodejs-server-sdk/releases/tag/1.8.0)

[Compare
Source](https://togithub.com/harness/ff-nodejs-server-sdk/compare/1.7.0...1.8.0)

#### What's Changes

- FFM-9097 Global Axios settings are no longer configured by the SDK,
which could override Axios settings used elsewhere in an application.
The default timeout is 30s but can be changed using options using
`axiosTimeout`, see:
[Options](https://togithub.com/harness/ff-nodejs-server-sdk/blob/main/docs/further_reading.md#available-options)
by [@&#8203;erdirowlands](https://togithub.com/erdirowlands) in
[https://github.com/harness/ff-nodejs-server-sdk/pull/114](https://togithub.com/harness/ff-nodejs-server-sdk/pull/114)
- \[FFM-11243] - Adding SDK support for AND/OR rules (feature not GA
yet) by [@&#8203;andybharness](https://togithub.com/andybharness) in
[https://github.com/harness/ff-nodejs-server-sdk/pull/113](https://togithub.com/harness/ff-nodejs-server-sdk/pull/113)
- FFM-11364 Use target-segments v2-rule parameter by
[@&#8203;erdirowlands](https://togithub.com/erdirowlands) in
[https://github.com/harness/ff-nodejs-server-sdk/pull/115](https://togithub.com/harness/ff-nodejs-server-sdk/pull/115)

**Full Changelog**:
harness/ff-nodejs-server-sdk@1.7.0...1.8.0

</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