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

Subscriptions: Respect DisableAssetWebsocketSupport for assets #1693

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Oct 25, 2024

Subscriptions:

  • Fix unsupported WS assets included

Bitmex:

  • Assertify and fix tests
  • Add index asset to test config

Fixes #1692

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested

  • go test ./... -race
  • golangci-lint run
  • TestGenerateSubscriptions covers the requirement, once index was added to configtest

@gbjk gbjk added the bug label Oct 25, 2024
@gbjk gbjk self-assigned this Oct 25, 2024
@gbjk gbjk added the review me This pull request is ready for review label Oct 25, 2024
@gbjk gbjk changed the title Bugfix/1692 bitmex Subscriptions: Respect DisableAssetWebsocketSupport for assets Oct 25, 2024
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

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

Minor thing, tested looks good 👍

exchanges/bitmex/bitmex_test.go Show resolved Hide resolved
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

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

Approved

@gbjk
Copy link
Collaborator Author

gbjk commented Nov 5, 2024

Rebased

exchanges/gateio/gateio_test.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.98%. Comparing base (8fe909d) to head (e58f029).
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1693      +/-   ##
==========================================
+ Coverage   36.95%   36.98%   +0.03%     
==========================================
  Files         414      414              
  Lines      180443   180447       +4     
==========================================
+ Hits        66677    66735      +58     
+ Misses     105923   105872      -51     
+ Partials     7843     7840       -3     
Files with missing lines Coverage Δ
exchanges/subscription/list.go 100.00% <100.00%> (ø)

... and 15 files with indirect coverage changes

@shazbert shazbert added the szrc shazbert review complete label Nov 11, 2024
at := e.GetAssetTypes(true)
at := []asset.Item{}
for _, a := range e.GetAssetTypes(true) {
if e.IsAssetWebsocketSupported(a) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

With only Index asset enabled
Only trade sub enabled:

 {
      "enabled": true,
      "channel": "trade",
      "asset": "all"
     },
[ERROR] | WEBSOCKET | 14/11/2024 11:49:43 | Bitmex websocket: subscription failure, trade all : subscription template did not generate the expected number of asset records: Got 1; Expected 0

Do you classify this as something to address?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Absolutely. That's a bug in the sub template (which I've made a few times now).
I'll fix.

@shazbert shazbert removed the szrc shazbert review complete label Nov 15, 2024
@shazbert shazbert self-requested a review November 15, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug review me This pull request is ready for review
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

Subscriptions: Respect DisableAssetWebsocketSupport for assets
3 participants