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: Relax subscription validation for non-existent pairs #1635

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Aug 27, 2024

The subscription pairs do not need to be validated as enabled or available. The check was just belt-and-braces and didn't have a specific use-case in mind.

Coinbase has a use-case for wanting to subscribe to BTC-USD when it's not enabled.

Moreover, it shouldn't be our job to check this. You want a sub expanded with these pairs? Fine. Done. If it doesn't work, you can work out why

Type of change

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

@gbjk gbjk added the bug label Aug 27, 2024
@gbjk gbjk self-assigned this Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.97%. Comparing base (2232340) to head (a220ea7).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1635      +/-   ##
==========================================
- Coverage   36.97%   36.97%   -0.01%     
==========================================
  Files         414      414              
  Lines      180449   180441       -8     
==========================================
- Hits        66720    66710      -10     
- Misses     105892   105893       +1     
- Partials     7837     7838       +1     
Files with missing lines Coverage Δ
exchanges/subscription/template.go 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

@gbjk gbjk added the review me This pull request is ready for review label Aug 27, 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.

One thing then looks good to go.

exchanges/subscription/template_test.go Outdated Show resolved Hide resolved
exchanges/subscription/template_test.go Outdated Show resolved Hide resolved
@gbjk gbjk requested a review from shazbert September 28, 2024 04:45
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.

Thanks! tACK.

@shazbert shazbert added the szrc shazbert review complete label Sep 28, 2024
@gbjk gbjk requested a review from gloriousCode October 23, 2024 02:21
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

I'm happy with the changes. Since #1480 is near the end, I'll seek clarification there and any amendments to that comment if necessary. Your work is already a part of 1480, however the if len(s.Pairs) != 0 { does not even get satisfied on CoinbasePro 🤷

tACK

@thrasher- thrasher- changed the title Subscriptions: Fix Subscription Pairs validated Subscriptions: Relax subscription validation for non-existent asset pairs Oct 23, 2024
The subscription pairs do not need to be validated as enabled or
available. The check was just belt-and-braces and didn't have a specific
use-case in mind.

Coinbase has a use-case for wanting to subscribe to BTC-USD when it's
not enabled.

Moreover, it shouldn't be our job to check this. You want a sub expanded
with these pairs? Fine. Done. If it doesn't work, you can work out why
@gbjk gbjk force-pushed the bugfix/sub_bears_pears branch from e49f7af to a220ea7 Compare October 23, 2024 03:49
@thrasher- thrasher- changed the title Subscriptions: Relax subscription validation for non-existent asset pairs Subscriptions: Relax subscription validation for non-existent pairs Oct 23, 2024
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

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

RIP🕯️NOPE POPE and 👋 BEAR PEAR

@thrasher- thrasher- merged commit 4c7c0bc into thrasher-corp:master Oct 23, 2024
9 of 13 checks passed
@gbjk gbjk deleted the bugfix/sub_bears_pears branch October 23, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high priority review me This pull request is ready for review szrc shazbert review complete
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants