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

Fix "Futures re-subscribe to authenticated feed doesn't work" #180

Merged

Conversation

btschwertfeger
Copy link
Owner

@btschwertfeger btschwertfeger commented Dec 18, 2023

Summary

This MR fixes the mentioned bug using the suggested change - as described in #179 by setting the __challenge_ready-flag to False in case of a failed task to enforce setting a new challenge and not using the old/broken one.

More changes and additions:

  • Add tests (also for the Spot websocket clients) to check that reconnect and resubscribe behaviour after a temporary connection lost
  • Adjust the internal caching of subscriptions for Spot to prevent failing resubscriptions due to Krakens current subscription-response behaviour for WS V2.

@btschwertfeger btschwertfeger added this to the Future Release milestone Dec 18, 2023
@btschwertfeger btschwertfeger self-assigned this Dec 18, 2023
@btschwertfeger btschwertfeger linked an issue Dec 18, 2023 that may be closed by this pull request
@btschwertfeger btschwertfeger changed the title fix the futures ws reconnect issue + add test that checks for that Fix "Futures re-subscribe to authenticated feed doesn't work" Dec 18, 2023
@btschwertfeger btschwertfeger added Bug Something isn't working Futures Topic related to Futures trading Spot Topic related to Spot trading Testing Test-related labels Dec 18, 2023
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Merging #180 (52dd055) into master (2e430bb) will increase coverage by 1.93%.
The diff coverage is 95.83%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   87.79%   89.73%   +1.93%     
==========================================
  Files          21       21              
  Lines        1877     1890      +13     
==========================================
+ Hits         1648     1696      +48     
+ Misses        229      194      -35     
Flag Coverage Δ
unittests 89.73% <95.83%> (+1.93%) ⬆️

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

Files Coverage Δ
kraken/futures/websocket/__init__.py 88.27% <100.00%> (+9.65%) ⬆️
kraken/spot/websocket/connectors.py 91.26% <94.44%> (+10.64%) ⬆️

@btschwertfeger btschwertfeger marked this pull request as ready for review December 18, 2023 18:22
@btschwertfeger btschwertfeger merged commit 24b3e60 into master Dec 18, 2023
20 checks passed
@btschwertfeger btschwertfeger deleted the 179-futures-re-subscribe-to-authenticated-feed-doesnt-work branch December 18, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Futures Topic related to Futures trading Spot Topic related to Spot trading Testing Test-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Futures re-subscribe to authenticated feed doesn't work
1 participant