-
Notifications
You must be signed in to change notification settings - Fork 734
Describe view using legacy msg bus service #9485
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
Conversation
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| if (response.status() != NKikimr::NMsgBusProxy::MSTATUS_OK) { | ||
| throw yexception() << "scheme describe error status: " << response.status() | ||
| << ", issues: " << NYql::IssuesFromMessageAsString(response.issues()); | ||
| } |
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.
I haven't written unit tests yet, because I'm not sure this approach would be the accepted one, but if you are interested in the output of the ydb scheme describe command, here is how it looks like:
...$ ydb scheme describe v
<view> v
Query text: select * from t
...$ ydb scheme describe vvv
Status: SCHEME_ERROR
Issues:
<main>: Error: Path not found
I'm not sure where the error message is generated. You can notice that its format is different from what I have written for the response.status() != MSTATUS_OK case.
However, error handling is covered 🤷
| auto clientConfig = NYdbGrpc::TGRpcClientConfig(config.Address); | ||
| if (config.EnableSsl) { | ||
| clientConfig.EnableSsl = config.EnableSsl; | ||
| clientConfig.SslCredentials.pem_root_certs = config.CaCerts; |
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.
I have tested:
- no authentication
- YDB token authentication
I imagine I would need to test all of the other methods to be sure that the GRPC client is configured correctly 😢
| @@ -1,5 +1,10 @@ | |||
| #include "ydb_service_scheme.h" | |||
|
|
|||
| #include <ydb/core/protos/flat_scheme_op.pb.h> | |||
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.
No way.
|
@jepett0, the legacy MessageBus API is in the middle of being removed from the codebase; you need to go with other options. |
|
Will implement using the approach 1. See PR |
We want YDB CLI to return view query text on
ydb scheme describe view_to_describecommand.There is no generic GRPC service that can return SchemeShard's private protobuf info to YDB CLI. We have to choose from the following options:
DescribeViewcall there. This approach seems to be the currently adopted one. See the recently added replication service and object storage service which both have a single RPC in them.DescribeViewcall to the TableService. I'm not sure if adding theDescribeViewcall here is a good option since this service is concerned with tables only.TGrpcClientwe would have to rewrite this code too. However, I don't think it would take too much time to rewrite it.The current PR implements the third approach.