Skip to content

Commit

Permalink
Drop unimplemented/unused exchange methods. (#143)
Browse files Browse the repository at this point in the history
These have been unimplemented for so long that having them in the API definition is misleading and results in maintenance overhead.
  • Loading branch information
SanjayVas authored Jun 5, 2023
1 parent 1794f35 commit fc4d34b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 240 deletions.
10 changes: 0 additions & 10 deletions src/main/proto/wfa/measurement/api/v2alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,6 @@ proto_library(
],
)

proto_library(
name = "recurring_exchanges_service_proto",
srcs = ["recurring_exchanges_service.proto"],
deps = [
":recurring_exchange_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)

proto_library(
name = "exchanges_service_proto",
srcs = ["exchanges_service.proto"],
Expand All @@ -530,7 +521,6 @@ proto_library(
deps = [
":exchange_step_attempt_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ syntax = "proto3";
package wfa.measurement.api.v2alpha;

import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
import "wfa/measurement/api/v2alpha/exchange_step_attempt.proto";

option java_package = "org.wfanet.measurement.api.v2alpha";
Expand All @@ -29,14 +28,6 @@ option java_outer_classname = "ExchangeStepAttemptsServiceProto";
// The only way to create an ExchangeStepAttempt is through the
// /ExchangeSteps.ClaimReadyExchangeStep method.
service ExchangeStepAttempts {
// Returns the `ExchangeStepAttempt` with the specified resource key.
rpc GetExchangeStepAttempt(GetExchangeStepAttemptRequest)
returns (ExchangeStepAttempt);

// Lists `ExchangeStepAttempts`.
rpc ListExchangeStepAttempts(ListExchangeStepAttemptsRequest)
returns (ListExchangeStepAttemptsResponse);

// Adds a log entry to an `ExchangeStepAttempt`.
rpc AppendLogEntry(AppendLogEntryRequest) returns (ExchangeStepAttempt);

Expand All @@ -48,58 +39,6 @@ service ExchangeStepAttempts {
returns (ExchangeStepAttempt);
}

// Request message for `GetExchangeStepAttempt` method.
message GetExchangeStepAttemptRequest {
// Resource name.
string name = 1 [(google.api.resource_reference).type =
"halo.wfanet.org/ExchangeStepAttempt"];
}

// Request message for `ListExchangeStepAttempts` method.
message ListExchangeStepAttemptsRequest {
// The parent `ExchangeStep`. If blank, `ListExchangeSteps` will consider all
// ExchangeStepAttempts belonging to the caller.
string parent = 1
[(google.api.resource_reference).type = "halo.wfanet.org/Exchange"];

// The maximum number of `ExchangeStepAttempt`s to return.
// The service may return fewer than this value.
// If unspecified, at most 50 `ExchangeStepAttempt`s will be returned.
// The maximum value is 1000; values above 1000 will be coerced to 1000.
//
// Typically, an ExchangeStep will only have 0 or 1 ExchangeStepAttempts, so
// most of the time this can be omitted and all results will fit in a single
// response.
int32 page_size = 2;

// A page token, received from a previous `ListExchangeStepAttemptsRequest`
// call. Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to
// `ListExchangeStepAttemptsRequest` must match the call that provided the
// page token.
string page_token = 3;

// Filter criteria. Repeated fields are treated as logical ORs, and multiple
// fields specified as logical ANDs.
message Filter {
repeated ExchangeStepAttempt.State state = 1;
google.protobuf.Timestamp created_before = 2;
google.protobuf.Timestamp created_on_or_after = 3;
}
Filter filter = 4;
}

// Response message for `ListExchangeStepAttempts` method.
message ListExchangeStepAttemptsResponse {
// Page of `ExchangeStepAttempt`s.
repeated ExchangeStepAttempt exchange_step_attempts = 1;

// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}

// Request message for `AppendLogEntry` method.
message AppendLogEntryRequest {
// The `ExchangeStepAttempt` to append the entry to. It must be in a valid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ option java_outer_classname = "ExchangeStepsServiceProto";

// Service for interacting with `ExchangeStep` resources.
service ExchangeSteps {
// Returns the `ExchangeStep` with the specified resource key.
rpc GetExchangeStep(GetExchangeStepRequest) returns (ExchangeStep);

// Claims a single ExchangeStep that is ready to be worked on and creates an
// initial ExchangeStepAttempt for it.
//
Expand All @@ -43,13 +40,6 @@ service ExchangeSteps {
returns (ListExchangeStepsResponse);
}

// Request message for `GetExchangeStep` method.
message GetExchangeStepRequest {
// Resource name.
string name = 1
[(google.api.resource_reference).type = "halo.wfanet.org/ExchangeStep"];
}

// Request message for `ClaimReadyExchangeStep` method.
message ClaimReadyExchangeStepRequest {
// If an `ExchangeStep` is returned, it should be executed by this party.
Expand Down Expand Up @@ -122,4 +112,4 @@ message ListExchangeStepsResponse {
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}
}
55 changes: 0 additions & 55 deletions src/main/proto/wfa/measurement/api/v2alpha/exchanges_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ option java_outer_classname = "ExchangesServiceProto";
service Exchanges {
// Returns the `Exchange` with the specified resource key.
rpc GetExchange(GetExchangeRequest) returns (Exchange);

// Lists `Exchanges`.
rpc ListExchanges(ListExchangesRequest) returns (ListExchangesResponse);

// Uploads an encrypted audit trail for the exchange.
// Only the EDP will be authorized to call this method.
// Multiple calls to this will only save the latest complete audit trail.
rpc UploadAuditTrail(stream UploadAuditTrailRequest) returns (Exchange);
}

// Request message for `GetExchange` method.
Expand All @@ -51,50 +43,3 @@ message GetExchangeRequest {
"halo.wfanet.org/ModelProvider"];
}
}

// Request message for `ListExchanges` method.
message ListExchangesRequest {
// TODO(efoxepstein): add fields

// The maximum number of `Exchange`s to return.
// The service may return fewer than this value.
// If unspecified, at most 50 `Exchange`s will be returned.
// The maximum value is 1000; values above 1000 will be coerced to 1000.
int32 page_size = 2;

// A page token, received from a previous `ListExchangesRequest` call.
// Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListExchangesRequest`
// must match the call that provided the page token.
string page_token = 3;
}

// Response message for `ListExchanges` method.
message ListExchangesResponse {
// Page of `Exchange`s.
repeated Exchange exchanges = 1;

// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}

// Request message for `UpdateAuditTrail` method.
message UploadAuditTrailRequest {
// The first streamed message in a request must specify a `header`; subsequent
// messages must specify `audit_trail_data`.
oneof payload {
// First message that identifies the `Exchange`.
Header header = 1;

// Encrypted bytes of the audit trail.
bytes audit_trail_data = 2;
}

message Header {
// The `Exchange` to upload the data to.
string name = 1
[(google.api.resource_reference).type = "halo.wfanet.org/Exchange"];
}
}

This file was deleted.

0 comments on commit fc4d34b

Please sign in to comment.