Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/stovepipe/gateway/proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ proto_library(
name = "gatewaypb_proto",
srcs = ["gateway.proto"],
visibility = ["//visibility:public"],
deps = ["//api/base/change/proto:changepb_proto"],
)

# keep
Expand All @@ -23,6 +24,8 @@ go_proto_library(
importpath = "github.com/uber/submitqueue/api/stovepipe/gateway/proto",
proto = ":gatewaypb_proto",
visibility = ["//visibility:public"],
# keep
deps = ["//api/base/change/proto:changepb_go_proto"],
)

go_library(
Expand Down
21 changes: 21 additions & 0 deletions api/stovepipe/gateway/proto/gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ option java_multiple_files = true;
option java_outer_classname = "GatewayProto";
option java_package = "com.uber.submitqueue.stovepipe";

import "api/base/change/proto/change.proto";

// PingRequest is the request for the Ping method
message PingRequest {
// Optional message to include in the ping
Expand All @@ -39,8 +41,27 @@ message PingResponse {
string hostname = 4;
}

// IngestRequest defines a request to ingest a trunk commit into Stovepipe, triggering its verification (build and test) post-merge/post-submit.
message IngestRequest {
// Name of the queue processing the ingest request. The queue should be defined in the configuration, otherwise an error is returned.
string queue = 1;
// Change (trunk commit) to ingest, identified by URI. The target trunk and build/test configuration are defined by the queue configuration.
// Stovepipe ingests commits that are already on trunk; for git, supply a "git://<remote>/<repo>/<ref>/<commit_sha>" URI.
uber.base.change.Change change = 2;
}

// IngestResponse defines the response to an ingest request.
message IngestResponse {
// Globally unique identifier for the ingested commit's verification request (the "stovepipe id", spid). Used to track the request lifecycle.
string spid = 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give more clarification on what this ID is? Is it for identifying each request? If so should we store each request? Or is the id of the change(s) ingested into the queue. If so, shouldn't we give the id of each uri ingested into the queue?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, so this should be generated by gateway against a queue and the counter, very similar to what is done in SQ

}

// StovepipeGateway provides the Stovepipe gateway API.
service StovepipeGateway {
// Ping returns a response indicating the service is alive
rpc Ping(PingRequest) returns (PingResponse) {}

// Ingest accepts a trunk commit and triggers its verification (post-merge/post-submit build and test).
// The processing is asynchronous and returns an IngestResponse immediately; the verification runs in the background.
rpc Ingest(IngestRequest) returns (IngestResponse) {}
}
1 change: 1 addition & 0 deletions api/stovepipe/gateway/protopb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go_library(
importpath = "github.com/uber/submitqueue/api/stovepipe/gateway/protopb",
visibility = ["//visibility:public"],
deps = [
"//api/base/change/protopb",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
Expand Down
143 changes: 129 additions & 14 deletions api/stovepipe/gateway/protopb/gateway.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading