-
Notifications
You must be signed in to change notification settings - Fork 482
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
Use new GRPC hub API if it's available #3314
Use new GRPC hub API if it's available #3314
Conversation
should this be marked as Draft? |
Actually, I think the hub needs to be merged and create a release first, so the HubNode can download the latest release from there if needed. |
all of the automated tests should be green before this is moved out of Draft |
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.
Is test_hub_commands.py
testing something that isn't tested by test_claim_commands.py
? Do we need both?
See inline comments for more feedback.
I fixed the issues mentioned and the build works on ubuntu, both the windows and macos build fail so I commented them out for now so that I could make sure the ubuntu build would actually run and pass. |
does this connect the new hub code to our CI/CD process? |
cf59d37
to
a927cac
Compare
I set the environment variable GO_HUB=true in the github pipeline yaml, so as long as that works the way I think it does, it should be using my go hub for the tests. |
619ab7a
to
ae21fc3
Compare
to add:
|
557c5da
to
78fc9a3
Compare
todo: review the kwargs changes
|
78fc9a3
to
ce87c37
Compare
Have the basic starting /stopping / querying. Still don't have the hub jsonrpc stuff working right and from the looks of it I need to clearify some of the logic in the claim search function itself because it's not returning the correct number of claims anyways. get the integration working with grpcurl Got tests working, still need to port the rest of them ported all of the claim search tests still a few failing due to not having inflation working, and there's something weird with limit_claims_per_channel that needs to be fixed.
Fixing tests relabel failing tests properly run all the tests for the hub cleanup HubNode
more protobuf changes (fix imports)
Cleanup prints and commented out code remove print don't do list claims cleanup
11f9817
to
e21c9e8
Compare
except Exception as e: | ||
if self.ledger.config['use_go_hub']: | ||
log.warning("failed, trying again without hub") | ||
self.ledger.config['use_go_hub'] = False | ||
return await self.jsonrpc_claim_search(**kwargs_old) |
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.
@jeffreypicard two things
- we shouldn't modify the config like this. if another config is saved elsewhere, this setting will also be saved
- if this fallback is disabled, a bunch of tests fail. therefore we think this is hiding test failures by falling back to old working code.
more generally, if tests pass for all the new code, then errors here should be treated like production errors -- the sdk should report the error to the user.
closing because #3394 supersedes it |
To run the go hub tests.
Clone and run the hub from here https://github.com/lbryio/hub using branch "claim_search_port"
git clone git@github.com:lbryio/hub.git
./dev.sh
Alternatively you can build the hub and copy the
lbry/wallet/bin
in this repo.git clone git@github.com:lbryio/hub.git
go build .
cp hub <lbry-sdk-location>/lbry/wallet/bin/
Run the tests
export GO_HUB=true
python -m unittest discover tests.integration.hub.test_hub_commands
The claim search tests now also all work with GO_HUB=true set.
python -m unittest discover tests.integration.blockchain.test_claim_commands
You can also set HUB_HOST and HUB_PORT, it defaults to localhost:50051