-
Notifications
You must be signed in to change notification settings - Fork 387
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
satellite/vouchers: deprecate voucher endpoint, return 'please upgrade' error #2940
Conversation
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.
yay less code
satellite/vouchers/endpoint.go
Outdated
expiration: expiration, | ||
} | ||
} | ||
type Endpoint struct{} | ||
|
||
// Request receives a voucher request and returns a voucher and an error |
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.
update comment, do we want to say that this is kept in for backwards compatibility?
satellite/vouchers/endpoint.go
Outdated
type Config struct { | ||
Expiration time.Duration `help:"length of time before a voucher expires" default:"720h0m0s"` | ||
} | ||
|
||
// Endpoint for issuing signed vouchers |
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.
could we update this comment and say this is deprecated
Voucher: voucher, | ||
Status: pb.VoucherResponse_ACCEPTED, | ||
}, nil | ||
return nil, errs.New("Vouchers endpoint is deprecated. Please upgrade your storage node to the latest version.") |
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.
will this cause any crashing downstream?
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.
It shouldn't. The old storage node voucher service just logs errors and continues running and I have a test for checking that the client receives the correct error message
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.
ok great
What: Since we are removing kademlia, we no longer need vouchers. We have already removed the voucher request service on the storage node. This PR removes the logic inside the satellite vouchers endpoint and instead returns a custom error asking the storage node to upgrade to the latest version
Why: We have already removed the storage node voucher request service, but not all storage node operators will have updated to this version. If we remove the satellite vouchers endpoint entirely, those who have not upgraded will see errors and ask the community for help. Returning a custom error asking the storage node to upgrade should remedy the situation
Please describe the tests:
Please describe the performance impact:
Code Review Checklist (to be filled out by reviewer)