Skip to content

[feat] Proto API for Gateway service#11

Merged
sbalabanov merged 1 commit into
mainfrom
sergeyb
Feb 13, 2026
Merged

[feat] Proto API for Gateway service#11
sbalabanov merged 1 commit into
mainfrom
sergeyb

Conversation

@sbalabanov
Copy link
Copy Markdown
Contributor

API object model for the controller implementing getting a SubmitQueue land request

@sbalabanov sbalabanov requested review from a team as code owners February 11, 2026 21:15
Comment thread gateway/proto/gateway.proto
Comment thread gateway/proto/gateway.proto
Comment thread gateway/proto/gateway.proto
Comment thread gateway/proto/gateway.proto
@sbalabanov
Copy link
Copy Markdown
Contributor Author

only changed comments supplier-<provider so far, let me know if you have strong preference on naming

)

// LandController handles land business logic for the gateway
type LandController struct {
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 this be called Controller simply?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we could but then we might need create another folder say controller/land/controller.go

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I leave it as is for now, following the "Ping" example

Comment on lines +21 to +26
if logger == nil {
logger = zap.NewNop()
}
if scope == nil {
scope = tally.NoopScope
}
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 we default initialize? For tests we can initialize with noop or as needed (if validating things in the logger or scope).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we probably should, again just following the example for now

Comment on lines +27 to +33
if err != nil {
t.Fatalf("Land() returned error: %v", err)
}

if resp.Sqid == "" {
t.Fatal("Expected sqid to be set, got empty string")
}
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.

Any reason we are not performing assertions here instead? Why do we need t.Fatal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

following the example, we should switch to asserts at some point, will require adding a dependency

Comment thread gateway/proto/gateway.proto Outdated
Comment thread gateway/proto/gateway.proto
Comment thread gateway/proto/gateway.proto Outdated
message LandRequest {
// Name of the queue processing the land request. The queue should be defined in the configuration, otherwise an error is returned.
string queue = 1;
// Change (such as a pull request) to land into the target branch. Target branch is defined by the queue configuration.
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 we clarify if this is a url or a change ID with an e.g?

@sbalabanov sbalabanov merged commit 0beff58 into main Feb 13, 2026
1 check passed
@sbalabanov sbalabanov deleted the sergeyb branch February 13, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants