-
-
Notifications
You must be signed in to change notification settings - Fork 188
fix: enhance httpDownload with retry logic #931
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the weird gitignore changes, this looks pretty OK.
Please drop the commit that adds the changes to gitignore and resulting file inclusions.
| #lib | ||
| #packages/mongodb-memory-server-core/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed and all the generated files included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am testing in the CI/CD environment with the forked version for which I needed to publish to npm.
packages/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #931 +/- ##
==========================================
- Coverage 90.85% 89.77% -1.09%
==========================================
Files 15 15
Lines 2035 2063 +28
Branches 513 509 -4
==========================================
+ Hits 1849 1852 +3
- Misses 175 211 +36
+ Partials 11 0 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
FYI: you can ignore the coverage report for this PR as download logic has no tests beforehand anyway. (unless you want to add some?) Aside from that, this PR's main code looks good, but i will not merge it as long as there are extra changes (like package rename and inclusion of transpiled files in the git history) |
|
Created new PR with just the changes to ts files here - #934 |
This pull request enhances the
MongoBinaryDownloadclass inpackages/mongodb-memory-server-core/src/util/MongoBinaryDownload.tsby introducing retry logic for downloads, improving error handling. These changes aim to make the file download process more robust and resilient to network issues.Note - Earlier version of this PR had "timer to detect network stall" but in my testing that did not work so had to remove it.
Enhancements to download functionality:
maxRetriesandbaseDelayparameters. [1] [2]Improvements to error handling:
Code quality updates:
fixes #929