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

oasis-node: Add support for IsReady and WaitReady RPC methods #2957

Merged
merged 5 commits into from
Jun 8, 2020

Conversation

matevz
Copy link
Member

@matevz matevz commented May 29, 2020

Fixes #2130

@matevz matevz force-pushed the matevz/feature/waitready-rpc branch 2 times, most recently from 7396a7d to 0b49973 Compare June 1, 2020 14:53
@matevz matevz marked this pull request as ready for review June 1, 2020 14:56
@matevz matevz force-pushed the matevz/feature/waitready-rpc branch from 0b49973 to 3cf5b4c Compare June 1, 2020 14:57
kostko
kostko previously requested changes Jun 1, 2020
.changelog/2130.internal.md Outdated Show resolved Hide resolved
.changelog/2130.internal.md Outdated Show resolved Hide resolved
go/control/api/api.go Show resolved Hide resolved
go/control/api/api.go Outdated Show resolved Hide resolved
go/control/api/grpc_debug.go Outdated Show resolved Hide resolved
go/oasis-node/cmd/node/node.go Show resolved Hide resolved
go/oasis-node/cmd/node/node.go Outdated Show resolved Hide resolved
go/oasis-node/cmd/node/node.go Outdated Show resolved Hide resolved
go/oasis-test-runner/scenario/e2e/runtime.go Outdated Show resolved Hide resolved
go/worker/keymanager/worker.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/feature/waitready-rpc branch 3 times, most recently from fc7b0ea to 254adaf Compare June 2, 2020 13:52
@matevz matevz force-pushed the matevz/feature/waitready-rpc branch from 6532e73 to 42da091 Compare June 3, 2020 07:55
go/worker/keymanager/worker.go Outdated Show resolved Hide resolved
go/worker/keymanager/worker.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/feature/waitready-rpc branch from 0cea87a to 5526cb7 Compare June 3, 2020 13:50
@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #2957 into master will decrease coverage by 0.27%.
The diff coverage is 68.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2957      +/-   ##
==========================================
- Coverage   68.74%   68.47%   -0.28%     
==========================================
  Files         360      360              
  Lines       35285    35386     +101     
==========================================
- Hits        24258    24229      -29     
- Misses       7922     8040     +118     
- Partials     3105     3117      +12     
Impacted Files Coverage Δ
go/control/control.go 36.36% <33.33%> (-2.67%) ⬇️
go/control/api/grpc.go 47.66% <36.00%> (-3.56%) ⬇️
go/oasis-node/cmd/node/node.go 55.84% <69.44%> (+1.36%) ⬆️
go/worker/registration/worker.go 68.53% <82.60%> (+0.54%) ⬆️
go/keymanager/client/client.go 83.76% <100.00%> (+1.19%) ⬆️
go/worker/keymanager/worker.go 67.96% <100.00%> (+0.58%) ⬆️
go/worker/storage/worker.go 91.57% <100.00%> (ø)
go/consensus/tendermint/api/api.go 74.54% <0.00%> (-14.55%) ⬇️
go/consensus/tendermint/apps/scheduler/query.go 71.05% <0.00%> (-7.90%) ⬇️
go/consensus/tendermint/apps/staking/query.go 49.09% <0.00%> (-7.28%) ⬇️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc893d3...d0551ab. Read the comment docs.

@matevz matevz force-pushed the matevz/feature/waitready-rpc branch 3 times, most recently from 99e21da to a7cff7b Compare June 4, 2020 14:25
@matevz matevz force-pushed the matevz/feature/waitready-rpc branch from a7cff7b to 7b3bc49 Compare June 5, 2020 07:01
@kostko kostko force-pushed the matevz/feature/waitready-rpc branch 3 times, most recently from 995a6f2 to 012243f Compare June 5, 2020 09:29
@kostko kostko dismissed their stale review June 5, 2020 09:30

Changes addressed.

@kostko kostko force-pushed the matevz/feature/waitready-rpc branch 2 times, most recently from 7e2a2d2 to b46a1e4 Compare June 5, 2020 13:40
go/worker/keymanager/worker.go Show resolved Hide resolved
go/worker/storage/committee/node.go Outdated Show resolved Hide resolved
go/worker/storage/worker.go Outdated Show resolved Hide resolved
@kostko kostko force-pushed the matevz/feature/waitready-rpc branch 3 times, most recently from ccba4d3 to ce3d617 Compare June 5, 2020 20:44
The new method allows the caller to register a callback that will be invoked on
a successful registration that includes the node descriptor updated by the
passed hook.
@kostko kostko force-pushed the matevz/feature/waitready-rpc branch from ce3d617 to 259a147 Compare June 8, 2020 08:00
@kostko kostko force-pushed the matevz/feature/waitready-rpc branch from 259a147 to d0551ab Compare June 8, 2020 08:21
// Calls can fail around epoch transitions, as the access policy
// is being updated, so we must retry.
return err
case status.Code(err) == codes.Unavailable:
// XXX: HACK: Find a better way to determine the root cause.
if strings.Contains(err.Error(), "tls: bad public key") {
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, due to gRPC's use of wrapping RPC errors (see here) it is not possible to get the original error.

@kostko kostko merged commit 26b9431 into master Jun 8, 2020
@kostko kostko deleted the matevz/feature/waitready-rpc branch June 8, 2020 08:50
@ptrus ptrus mentioned this pull request Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IsReady/WaitReady to client protocol
4 participants