-
Notifications
You must be signed in to change notification settings - Fork 9
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
improve(PriceClient): Permit retry on failed lookups #157
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ecba935
improve(PriceClient): Inherit base HTTP adapter args
pxrl eb2f02a
improve(PriceClient): Permit retry on failed lookups
pxrl 568e3b9
Merge branch 'master' into pxrl/priceclient-retries
pxrl 28da251
Fix bad auto-merge
pxrl 823a6a0
Simplify mocked sleep object
pxrl 7643866
chore: Bump ts 4.6.2 -> 4.9.5
pxrl b7149e4
Merge remote-tracking branch 'origin/master' into pxrl/priceclient-re…
pxrl 97334e7
Updates for ts 4.9.5
pxrl ebe6da8
Sharpen test
pxrl d7f200e
Revert use of Error.cause
pxrl 5c42d1b
Test success after retries
pxrl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
FWIW, if we bump to TypeScript 4.9 then it should be possible to tack
errs
in under thecause
argument toError()
. This would mean we don't need to concatenate errs into a string and might be desirable for nicer logging by upper-layer error handlers. Reference: microsoft/TypeScript#50583.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 not bump it? Does it break anything?
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.
Fair question - was wary of a yak shaving exercise but it turned out to be a small diff, and all our tests pass: #159.
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.
Has been bumped now 👍.
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.
FWIW I tried using
Error(..., { cause })
, but ended up in some kind of purgatory.Per https://stackoverflow.com/a/73394582, it seems like we'd need at least es2022 support in our environment (i.e. specified via
lib: [..., "es2022"]
intsconfig.json
).My env seems to support up to es2020 (tsc v4.9.5, nodejs v18.14.1)...but for the following code, I consistently get killed when I try to pass >1 arguments to
Error()
.I've also noticed that I can't specify "es2022" for tsconfig.json compilerOptions.lib:
Ultimately I was able to chase this down to a package named
rollup-plugin-typescript2
, which is a depdendency oftsdx
. It seems like rpt2 doesn't yet permites2022
to be explicitly specified intsconfig.json
😞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.
See also #157 (comment) for an intermediate conclusion on why we can't use
Error(..., { cause})
yet.