Skip to content

Commit 8660801

Browse files
authored
chore(spanner): omit rpc InternalUpdateGraphOperation (#15349)
1 parent 677354c commit 8660801

22 files changed

+1
-271
lines changed

generator/generator_config.textproto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,6 +3663,7 @@ service {
36633663
retryable_status_codes: ["kUnavailable"]
36643664
generate_rest_transport: true
36653665
omit_repo_metadata: true
3666+
omitted_rpcs: ["InternalUpdateGraphOperation"]
36663667
}
36673668
36683669
service {

google/cloud/spanner/admin/database_admin_client.cc

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -692,29 +692,6 @@ DatabaseAdminClient::ListBackupSchedules(
692692
return connection_->ListBackupSchedules(std::move(request));
693693
}
694694

695-
StatusOr<
696-
google::spanner::admin::database::v1::InternalUpdateGraphOperationResponse>
697-
DatabaseAdminClient::InternalUpdateGraphOperation(
698-
std::string const& database, std::string const& operation_id,
699-
Options opts) {
700-
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
701-
google::spanner::admin::database::v1::InternalUpdateGraphOperationRequest
702-
request;
703-
request.set_database(database);
704-
request.set_operation_id(operation_id);
705-
return connection_->InternalUpdateGraphOperation(request);
706-
}
707-
708-
StatusOr<
709-
google::spanner::admin::database::v1::InternalUpdateGraphOperationResponse>
710-
DatabaseAdminClient::InternalUpdateGraphOperation(
711-
google::spanner::admin::database::v1::
712-
InternalUpdateGraphOperationRequest const& request,
713-
Options opts) {
714-
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
715-
return connection_->InternalUpdateGraphOperation(request);
716-
}
717-
718695
StreamRange<google::longrunning::Operation> DatabaseAdminClient::ListOperations(
719696
std::string const& name, std::string const& filter, Options opts) {
720697
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));

google/cloud/spanner/admin/database_admin_client.h

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,71 +2493,6 @@ class DatabaseAdminClient {
24932493
google::spanner::admin::database::v1::ListBackupSchedulesRequest request,
24942494
Options opts = {});
24952495

2496-
// clang-format off
2497-
///
2498-
/// This is an internal API called by Spanner Graph jobs. You should never need
2499-
/// to call this API directly.
2500-
///
2501-
/// @param database Internal field, do not use directly.
2502-
/// @param operation_id Internal field, do not use directly.
2503-
/// @param opts Optional. Override the class-level options, such as retry and
2504-
/// backoff policies.
2505-
/// @return the result of the RPC. The response message type
2506-
/// ([google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse])
2507-
/// is mapped to a C++ class using the [Protobuf mapping rules].
2508-
/// If the request fails, the [`StatusOr`] contains the error details.
2509-
///
2510-
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
2511-
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
2512-
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
2513-
/// [`future`]: @ref google::cloud::future
2514-
/// [`StatusOr`]: @ref google::cloud::StatusOr
2515-
/// [`Status`]: @ref google::cloud::Status
2516-
/// [google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest]: @googleapis_reference_link{google/spanner/admin/database/v1/spanner_database_admin.proto#L1295}
2517-
/// [google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse]: @googleapis_reference_link{google/spanner/admin/database/v1/spanner_database_admin.proto#L1314}
2518-
///
2519-
// clang-format on
2520-
StatusOr<google::spanner::admin::database::v1::
2521-
InternalUpdateGraphOperationResponse>
2522-
InternalUpdateGraphOperation(std::string const& database,
2523-
std::string const& operation_id,
2524-
Options opts = {});
2525-
2526-
// clang-format off
2527-
///
2528-
/// This is an internal API called by Spanner Graph jobs. You should never need
2529-
/// to call this API directly.
2530-
///
2531-
/// @param request Unary RPCs, such as the one wrapped by this
2532-
/// function, receive a single `request` proto message which includes all
2533-
/// the inputs for the RPC. In this case, the proto message is a
2534-
/// [google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest].
2535-
/// Proto messages are converted to C++ classes by Protobuf, using the
2536-
/// [Protobuf mapping rules].
2537-
/// @param opts Optional. Override the class-level options, such as retry and
2538-
/// backoff policies.
2539-
/// @return the result of the RPC. The response message type
2540-
/// ([google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse])
2541-
/// is mapped to a C++ class using the [Protobuf mapping rules].
2542-
/// If the request fails, the [`StatusOr`] contains the error details.
2543-
///
2544-
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
2545-
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
2546-
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
2547-
/// [`future`]: @ref google::cloud::future
2548-
/// [`StatusOr`]: @ref google::cloud::StatusOr
2549-
/// [`Status`]: @ref google::cloud::Status
2550-
/// [google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest]: @googleapis_reference_link{google/spanner/admin/database/v1/spanner_database_admin.proto#L1295}
2551-
/// [google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse]: @googleapis_reference_link{google/spanner/admin/database/v1/spanner_database_admin.proto#L1314}
2552-
///
2553-
// clang-format on
2554-
StatusOr<google::spanner::admin::database::v1::
2555-
InternalUpdateGraphOperationResponse>
2556-
InternalUpdateGraphOperation(
2557-
google::spanner::admin::database::v1::
2558-
InternalUpdateGraphOperationRequest const& request,
2559-
Options opts = {});
2560-
25612496
// clang-format off
25622497
///
25632498
/// Lists operations that match the specified filter in the request. If the

google/cloud/spanner/admin/database_admin_connection.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,6 @@ DatabaseAdminConnection::ListBackupSchedules(
305305
StreamRange<google::spanner::admin::database::v1::BackupSchedule>>();
306306
}
307307

308-
StatusOr<
309-
google::spanner::admin::database::v1::InternalUpdateGraphOperationResponse>
310-
DatabaseAdminConnection::InternalUpdateGraphOperation(
311-
google::spanner::admin::database::v1::
312-
InternalUpdateGraphOperationRequest const&) {
313-
return Status(StatusCode::kUnimplemented, "not implemented");
314-
}
315-
316308
StreamRange<google::longrunning::Operation>
317309
DatabaseAdminConnection::ListOperations(
318310
google::longrunning::

google/cloud/spanner/admin/database_admin_connection.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,6 @@ class DatabaseAdminConnection {
338338
ListBackupSchedules(
339339
google::spanner::admin::database::v1::ListBackupSchedulesRequest request);
340340

341-
virtual StatusOr<google::spanner::admin::database::v1::
342-
InternalUpdateGraphOperationResponse>
343-
InternalUpdateGraphOperation(
344-
google::spanner::admin::database::v1::
345-
InternalUpdateGraphOperationRequest const& request);
346-
347341
virtual StreamRange<google::longrunning::Operation> ListOperations(
348342
google::longrunning::ListOperationsRequest request);
349343

google/cloud/spanner/admin/database_admin_connection_idempotency_policy.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,6 @@ Idempotency DatabaseAdminConnectionIdempotencyPolicy::ListBackupSchedules(
168168
return Idempotency::kIdempotent;
169169
}
170170

171-
Idempotency
172-
DatabaseAdminConnectionIdempotencyPolicy::InternalUpdateGraphOperation(
173-
google::spanner::admin::database::v1::
174-
InternalUpdateGraphOperationRequest const&) {
175-
return Idempotency::kNonIdempotent;
176-
}
177-
178171
Idempotency DatabaseAdminConnectionIdempotencyPolicy::ListOperations(
179172
google::longrunning::ListOperationsRequest) { // NOLINT
180173
return Idempotency::kIdempotent;

google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ class DatabaseAdminConnectionIdempotencyPolicy {
128128
virtual google::cloud::Idempotency ListBackupSchedules(
129129
google::spanner::admin::database::v1::ListBackupSchedulesRequest request);
130130

131-
virtual google::cloud::Idempotency InternalUpdateGraphOperation(
132-
google::spanner::admin::database::v1::
133-
InternalUpdateGraphOperationRequest const& request);
134-
135131
virtual google::cloud::Idempotency ListOperations(
136132
google::longrunning::ListOperationsRequest request);
137133

google/cloud/spanner/admin/internal/database_admin_auth_decorator.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -392,17 +392,6 @@ DatabaseAdminAuth::ListBackupSchedules(
392392
return child_->ListBackupSchedules(context, options, request);
393393
}
394394

395-
StatusOr<
396-
google::spanner::admin::database::v1::InternalUpdateGraphOperationResponse>
397-
DatabaseAdminAuth::InternalUpdateGraphOperation(
398-
grpc::ClientContext& context, Options const& options,
399-
google::spanner::admin::database::v1::
400-
InternalUpdateGraphOperationRequest const& request) {
401-
auto status = auth_->ConfigureContext(context);
402-
if (!status.ok()) return status;
403-
return child_->InternalUpdateGraphOperation(context, options, request);
404-
}
405-
406395
StatusOr<google::longrunning::ListOperationsResponse>
407396
DatabaseAdminAuth::ListOperations(
408397
grpc::ClientContext& context, Options const& options,

google/cloud/spanner/admin/internal/database_admin_auth_decorator.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,6 @@ class DatabaseAdminAuth : public DatabaseAdminStub {
218218
google::spanner::admin::database::v1::ListBackupSchedulesRequest const&
219219
request) override;
220220

221-
StatusOr<google::spanner::admin::database::v1::
222-
InternalUpdateGraphOperationResponse>
223-
InternalUpdateGraphOperation(
224-
grpc::ClientContext& context, Options const& options,
225-
google::spanner::admin::database::v1::
226-
InternalUpdateGraphOperationRequest const& request) override;
227-
228221
StatusOr<google::longrunning::ListOperationsResponse> ListOperations(
229222
grpc::ClientContext& context, Options const& options,
230223
google::longrunning::ListOperationsRequest const& request) override;

google/cloud/spanner/admin/internal/database_admin_connection_impl.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,23 +1060,6 @@ DatabaseAdminConnectionImpl::ListBackupSchedules(
10601060
});
10611061
}
10621062

1063-
StatusOr<
1064-
google::spanner::admin::database::v1::InternalUpdateGraphOperationResponse>
1065-
DatabaseAdminConnectionImpl::InternalUpdateGraphOperation(
1066-
google::spanner::admin::database::v1::
1067-
InternalUpdateGraphOperationRequest const& request) {
1068-
auto current = google::cloud::internal::SaveCurrentOptions();
1069-
return google::cloud::internal::RetryLoop(
1070-
retry_policy(*current), backoff_policy(*current),
1071-
idempotency_policy(*current)->InternalUpdateGraphOperation(request),
1072-
[this](grpc::ClientContext& context, Options const& options,
1073-
google::spanner::admin::database::v1::
1074-
InternalUpdateGraphOperationRequest const& request) {
1075-
return stub_->InternalUpdateGraphOperation(context, options, request);
1076-
},
1077-
*current, request, __func__);
1078-
}
1079-
10801063
StreamRange<google::longrunning::Operation>
10811064
DatabaseAdminConnectionImpl::ListOperations(
10821065
google::longrunning::ListOperationsRequest request) {

0 commit comments

Comments
 (0)