-
Notifications
You must be signed in to change notification settings - Fork 820
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
exchanges/websocket: Implement subscription configuration #1394
Conversation
23ce791
to
5495fcf
Compare
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.
Just a quick check, code and running looks good. 👍
c53bfd5
to
a1f316a
Compare
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've only done a small review of the overall concept, I'm happy to see it works. A few things I've picked up and then I can get into the nitty gritty
Replace for alias with index lookup for performance Fixes [review comment](thrasher-corp#1394 (comment))
This allows users to disable a subscription without losing definition of it from config Fixes [review comment](thrasher-corp#1394 (comment))
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.
Something that came up while testing.
Fixes [review comment](thrasher-corp#1394 (comment))
This allows users to disable a subscription without losing definition of it from config Fixes [review comment](thrasher-corp#1394 (comment))
Fixes [review comment](thrasher-corp#1394 (comment))
eecea48
to
b87ba50
Compare
This allows users to disable a subscription without losing definition of it from config Fixes [review comment](thrasher-corp#1394 (comment))
Fixes [review comment](thrasher-corp#1394 (comment))
09a5cba
to
15b3258
Compare
191a3fb
to
1832ab5
Compare
This allows users to disable a subscription without losing definition of it from config Fixes [review comment](thrasher-corp#1394 (comment))
Fixes [review comment](thrasher-corp#1394 (comment))
d3be869
to
64fd98c
Compare
@thrasher- I've pulled in the abstracted form of Also rebased to fix the master conflict. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1394 +/- ##
==========================================
+ Coverage 43.33% 43.39% +0.06%
==========================================
Files 366 367 +1
Lines 147087 147096 +9
==========================================
+ Hits 63744 63837 +93
+ Misses 75520 75436 -84
Partials 7823 7823
|
61928be
to
f4eca3b
Compare
🔁 Rebased on master |
f4eca3b
to
7283b51
Compare
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.
All looking good when running live. Very cool stuff!! 🎉
Some areas of improvement for future expansion would be explicit interval support and validation, since ATM I can set wild figures in the config for Binance and it'll happily accept it. Definitely a user error thing, but something we should guard against.
The other thing would be that if I put one invalid subscription entry, with the rest being valid. It will correctly report the invalid subscription but no other valid subscriptions will take place and the websocket connection will be establibshed but be completely idle. So the connection will be doing nothing. We should handle this by expecting at least one valid subscription enabled (on top of the correctly reported user configured issues), otherwise disable websocket and report the issue to the user.
Last thing would be unification of fills feed / trade feed and subscription togglability with gctcli. Overall a very cool feature, great work!
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 have found myself confused about how your rebasing timelines work. I requested changes on Jan 2nd, but there is only changes done on November 22nd and Jan 16 which was after I approved my review on January 8th.
So do change requests get bundled before or after? It is more difficult to keep track of all pull request reviews and their state of code leaving me doubting what code specifically I had already reviewed. I'll do a final review tomorrow
edit: Shazbert's request here: #1394 (comment)
got pulled into a commit from 2 months ago, yet it was raised on January 8th, meaning I can't really trust the commit from November 22nd since it has changed since I reviewed it
Rebased after you approved and added gcrc. At that point all changes you'd asked for and subsequently approved get fixuped down to their respective original commits. Then any commits added after that are left for you to see again. Specifically the code you haven't reviewed was 94da21f and 7283b51.
Yes. The commit was fixed on 8th January and merged down on 15th January ( specifically after you signalled you were done ). The commits change, but the body of code is as you last saw it. The autosquash just moves the commits down and merges them once you've approved your changes. As discussed previously, I'm leaving everything completely alone until each member is done, and then I merge it at that point. Since it seems confusing, I can leave it right until the end and then rebase at the very last moment? |
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.
Thank you for your explanations. I can put my reply which I messaged you here if you'd like.
I re-reviewed everything and only found the tiniest thing 😄
Thank you 🙏 Ready again. |
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.
tACK! Thanks for making those changes!
This allows the small type to be imported from both `config` and from `stream` without an import cycle, so we don't have to repeat ourselves
This was being mis-used through much of the code, and since we're already touching everything, we might as well fix it
* Simplify GenerateDefaultSubs * Improve TestGenSubs coverage * Test Candle Sub generation * Support Candle intervals * Full responsibility for formatting Channel name on GenerateDefaultSubs OR consumer of Subscribe * Simplify generatePayloads as a result * Fix test coverage of asset types in processMarketSnapshot
Use isolated test instance for `TestGetOpenInterest`. `TestGetOpenInterest` would occassionally change pairs before GenerateDefault Subs.
0e4eac8
to
44f7c91
Compare
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.
Great stuff @gbjk, awesome feature!
config
and fromstream
without an import cycle, so we don't have to repeat ourselvesType of change
Please delete options that are not relevant and add an
x
in[]
as item is complete.How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.