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

Hotfix: increase axios timeout #1062

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Hotfix: increase axios timeout #1062

wants to merge 1 commit into from

Conversation

rstijerina
Copy link
Member

@rstijerina rstijerina commented Feb 20, 2025

Overview:

Defaults to 1min now for timeout, and increases upload timeouts to 5min

PR Status:

  • Ready.

Testing Steps:

  1. Upload a largeish file and confirm it succeeds
  2. In client/src/hooks/datafiles/mutations/useUpload.ts, change the default timeout to 1000, 1 second. Upload the same file and watch it fail.

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.38%. Comparing base (96eb02e) to head (0583f43).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1062   +/-   ##
=======================================
  Coverage   70.38%   70.38%           
=======================================
  Files         538      538           
  Lines       33313    33314    +1     
  Branches     2955     2955           
=======================================
+ Hits        23446    23447    +1     
  Misses       9669     9669           
  Partials      198      198           
Flag Coverage Δ
javascript 72.54% <100.00%> (+<0.01%) ⬆️
unittests 61.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
client/src/hooks/datafiles/mutations/useUpload.ts 39.21% <100.00%> (+0.60%) ⬆️
client/src/utils/apiClient.ts 100.00% <100.00%> (ø)

Copy link
Member

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

LGTM as is but what if we just drop the timeout in axios? https://github.com/axios/axios/blob/649d739288c8e2c55829ac60e2345a0f3439c730/lib/defaults/index.js#L150-L152

then we'll just handle it upstream/server-side and have one less place to configure.

Copy link
Contributor

@edmondsgarrett edmondsgarrett left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants