-
Notifications
You must be signed in to change notification settings - Fork 364
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
impl(generator): add Start and Await overloads to clients #14370
Conversation
// clang-format off | ||
" Status\n", | ||
" StatusOr<$longrunning_operation_type$>\n"}, | ||
{" $method_name$(google::cloud::ExperimentalTag, " |
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.
same nit about: google::cloud::
@@ -20,6 +20,7 @@ | |||
#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_GOLDEN_KITCHEN_SINK_CLIENT_H | |||
|
|||
#include "generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h" | |||
#include "google/cloud/experimental_tag.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.
unused?
@@ -20,6 +20,7 @@ | |||
#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_GOLDEN_REST_ONLY_CLIENT_H | |||
|
|||
#include "generator/integration_tests/golden/v1/golden_rest_only_rest_connection.h" | |||
#include "google/cloud/experimental_tag.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.
unused?
@@ -57,12 +57,33 @@ GoldenThingAdminClient::CreateDatabase(std::string const& parent, std::string co | |||
return connection_->CreateDatabase(request); | |||
} | |||
|
|||
StatusOr<google::longrunning::Operation> | |||
GoldenThingAdminClient::CreateDatabase(ExperimentalTag, NoAwaitTag, std::string const& parent, std::string const& create_statement, Options opts) { |
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.
silly nit: should we name these tags and std::move
them into the connection call?
@@ -405,6 +419,12 @@ class GoldenThingAdminClient { | |||
future<StatusOr<google::test::admin::database::v1::UpdateDatabaseDdlMetadata>> | |||
UpdateDatabaseDdl(google::test::admin::database::v1::UpdateDatabaseDdlRequest const& request, Options opts = {}); | |||
|
|||
StatusOr<google::longrunning::Operation> |
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.
We need to document the client methods.
And the documentation should probably mention that the NoAwaitTag
overload is for advanced use cases.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14370 +/- ##
==========================================
+ Coverage 93.09% 93.55% +0.46%
==========================================
Files 2191 2280 +89
Lines 193032 204164 +11132
==========================================
+ Hits 179707 191012 +11305
+ Misses 13325 13152 -173 ☔ View full report in Codecov by Sentry. |
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.
Reviewable status: 0 of 705 files reviewed, 5 unresolved discussions (waiting on @dbolduc)
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
same nit about:
google::cloud::
Thought I fixed that, must have lost it in a merge/rebase.
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
unused?
Done.
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
unused?
Done.
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
silly nit: should we name these tags and
std::move
them into the connection call?
Possibly, it will require changes to the connection generation as well. If we decide we want this, I'll do it in a separate PR.
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
We need to document the client methods.
And the documentation should probably mention that the
NoAwaitTag
overload is for advanced use cases.
The documentation PR is next. I need to document the client functions, add the EXPECT_CALL comments on the preexisting connection functions, as well as the blurb in the CHANGELOG detailing the change in testing behavior.
part of the work for #7658
Adds the "Start" and "Await" overloads for each method_signature defined for the rpc to the Client class.
PR is split into multiple commits to separate changes, tests, and generated code.
This change is