Skip to content

feat(stovepipe): add Ingest RPC to gateway for trunk commit verification#262

Merged
behinddwalls merged 1 commit into
mainfrom
preetam/stovepipe-gw-ingest-proto
Jun 17, 2026
Merged

feat(stovepipe): add Ingest RPC to gateway for trunk commit verification#262
behinddwalls merged 1 commit into
mainfrom
preetam/stovepipe-gw-ingest-proto

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

Stovepipe verifies commits that are already on trunk (post-merge/post-submit build and test), but its gateway only exposed Ping. It needs an intake RPC, analogous to SubmitQueue's Land, where a client hands in a trunk commit and gets back a tracking id while verification runs asynchronously.

What?

Adds the Ingest RPC to the Stovepipe gateway proto contract (proto-only; controller and server wiring follow separately):

  • IngestRequest{ queue, change } and IngestResponse{ spid }, where spid is the "stovepipe id" handle for tracking the request lifecycle (mirroring Land's sqid).
  • change reuses the shared uber.base.change.Change wire type from the parent PR; for git, callers pass a git://<remote>/<repo>/<ref>/<commit_sha> commit URI. Unlike Land there is no merge strategy, since the commit is already on trunk.

Test Plan

  • make proto
  • ./tool/bazel build //...
  • make test

Stack

  1. refactor(proto): move protos to top-level api/ tree by domain/service #258
  2. refactor(proto): add shared api/base proto contracts (Change, Strategy) #261
  3. @ feat(stovepipe): add Ingest RPC to gateway for trunk commit verification #262

behinddwalls added a commit that referenced this pull request Jun 17, 2026
…#258)

## Summary
Stacked on top of `refactor` (#257). Moves all proto wire contracts into
a single top-level `api/` tree organized by `domain/service`, and lays
the groundwork for upcoming messagequeue payload contracts.

- Relocate each service's `proto/` and `protopb/` dirs to
`api/{domain}/{service}/` (history-preserving renames). New importpath:
`github.com/uber/submitqueue/api/{domain}/{service}/protopb`.
- Update `go_package`, all Bazel importpaths, root `gazelle:resolve`
hints, consumer `deps`, and all Go imports.
- Generalize the `tool/proto` codegen rule (`srcs` list) and the `make
proto` copy loop to support **multiple `.proto` files per service
package**, so messagequeue contracts can later live alongside each
service's RPC contract under the same `api/{domain}/{service}/proto/`
dir.
- Update docs (`CLAUDE.md` project layout / import paths / proto-gen
workflow, `example/README.md`).

The proto `package` declarations are intentionally left unchanged (only
`go_package` moved) to avoid churning wire-level type names.

## Test plan

- [x] `make build`
- [x] `make test` (54/54 pass)
- [x] `make check-gazelle`
- [x] `make lint`
- [x] `make check-tidy`
- [x] `make proto` produces zero drift vs committed stubs

Made with [Cursor](https://cursor.com)

## Stack
1. @ #258
1. #261
1. #262

Co-authored-by: Cursor <cursoragent@cursor.com>
@behinddwalls behinddwalls force-pushed the preetam/api-base-proto branch from edf2fe0 to cc1c653 Compare June 17, 2026 18:34
@behinddwalls behinddwalls force-pushed the preetam/stovepipe-gw-ingest-proto branch from 32c7e57 to 40602a0 Compare June 17, 2026 18:34
@behinddwalls behinddwalls marked this pull request as ready for review June 17, 2026 18:36
@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners June 17, 2026 18:36
// 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

@behinddwalls behinddwalls force-pushed the preetam/api-base-proto branch from 1dfcad4 to 6731318 Compare June 17, 2026 20:22
@behinddwalls

Copy link
Copy Markdown
Collaborator Author

⚠️ Automatic stack rebase failed

This PR could not be automatically rebased after its base PR was merged. The rebase hit conflicts that need manual resolution.

To fix manually:

git fetch origin
git checkout preetam/stovepipe-gw-ingest-proto
git rebase --onto origin/main d3e0a48a56f44d928321563515799cde786ca4b5 preetam/stovepipe-gw-ingest-proto
# resolve conflicts, then:
git push --force-with-lease

Then update this PR's base branch:

gh pr edit 262 --base main

Base automatically changed from preetam/api-base-proto to main June 17, 2026 21:38
## Summary

### Why?

Stovepipe verifies commits that are already on trunk (post-merge/post-submit build and test), but its gateway only exposed Ping. It needs an intake RPC, analogous to SubmitQueue's Land, where a client hands in a trunk commit and gets back a tracking id while verification runs asynchronously.

### What?

Adds the `Ingest` RPC to the Stovepipe gateway proto contract (proto-only; controller and server wiring follow separately):

- `IngestRequest{ queue, change }` and `IngestResponse{ spid }`, where `spid` is the "stovepipe id" handle for tracking the request lifecycle (mirroring Land's `sqid`).
- `change` reuses the shared `uber.base.change.Change` wire type from the parent PR; for git, callers pass a `git://<remote>/<repo>/<ref>/<commit_sha>` commit URI. Unlike Land there is no merge strategy, since the commit is already on trunk.

## Test Plan

- ✅ `make proto`
- ✅ `./tool/bazel build //...`
- ✅ `make test`

Co-authored-by: Cursor <cursoragent@cursor.com>
@behinddwalls behinddwalls force-pushed the preetam/stovepipe-gw-ingest-proto branch from 40602a0 to 5bb2355 Compare June 17, 2026 21:41
@behinddwalls behinddwalls merged commit a15f07e into main Jun 17, 2026
15 checks passed
@behinddwalls behinddwalls deleted the preetam/stovepipe-gw-ingest-proto branch June 17, 2026 21:44
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.

3 participants