Skip to content

test(submitqueue): land real GitHub PRs in CI e2e and integration tests - #808

Merged
roychying merged 1 commit into
mainfrom
preetam/github-merger-integ
Oct 8, 2026
Merged

roychying merged 1 commit into
mainfrom
preetam/github-merger-integ

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Why?

The merger's unit tests use a fake, which only encodes our reading of GitHub's docs. These suites check the merger, and SubmitQueue's whole land path, against real github.com on every CI run.

What?

  • TestGitHubLandE2E: gateway → orchestrator (GitHub change provider) → Runway (GitHub merger). It lands a single PR and a stack, and rejects PRs that are not a stack.
  • Merger integration test: a full stack with redelivery, a partial stack, non-stack lists, and a moved head.
  • Shared test/testutil/githubtestrepo fixtures, which skip unless SQ_GITHUB_TOKEN and SQ_GITHUB_TEST_REPO are set.
  • CI: the e2e job and a new merger-integration-test job take the test repo from the SQ_GITHUB_TEST_REPO repository variable and its token from the SQ_TEST_REPO_TOKEN repository secret. The secrets guard allows it as the only exception.
  • e2e-github-queue is added to queues.yaml and to MQ_TENANTS.
  • Any contributor can use their own test repo, locally or in their fork's CI; TESTING.md lists what it needs. CI requires the token only where SQ_GITHUB_TEST_REPO is set.

Test Plan

✅ TestGitHubLandE2E 3/3 and the merger integration test 4/4 against behinddwalls/sq-demo; no fixtures left behind
✅ make lint check-gazelle check-tidy

Stack

  1. feat(runway): land GitHub stacks through the REST API #807
  2. @ test(submitqueue): land real GitHub PRs in CI e2e and integration tests #808

🤖 Generated with Claude Code

Comment thread test/testutil/githubtestrepo/githubtestrepo.go Outdated
@roychying
roychying force-pushed the preetam/github-merger-integ branch from a3aa48e to 8f983c6 Compare October 8, 2026 16:55
Base automatically changed from github-merger to main October 8, 2026 17:14
## Summary

### Why?

The merger's unit tests use a fake, which only encodes our reading of GitHub's docs. These suites check the merger, and SubmitQueue's whole land path, against real github.com on every CI run.

### What?

- `TestGitHubLandE2E`: gateway → orchestrator (GitHub change provider) → Runway (GitHub merger). It lands a single PR and a stack, and rejects PRs that are not a stack.
- Merger integration test: a full stack with redelivery, a partial stack, non-stack lists, and a moved head.
- Shared `test/testutil/githubtestrepo` fixtures, which skip unless `SQ_GITHUB_TOKEN` and `SQ_GITHUB_TEST_REPO` are set.
- CI: the `e2e` job and a new `merger-integration-test` job take the test repo from the `SQ_GITHUB_TEST_REPO` repository variable and its token from the `SQ_TEST_REPO_TOKEN` repository secret. The secrets guard allows it as the only exception.
- `e2e-github-queue` is added to `queues.yaml` and to `MQ_TENANTS`.
- Any contributor can use their own test repo, locally or in their fork's CI; `TESTING.md` lists what it needs. CI requires the token only where `SQ_GITHUB_TEST_REPO` is set.

## Test Plan

✅ `TestGitHubLandE2E` 3/3 and the merger integration test 4/4 against `behinddwalls/sq-demo`; no fixtures left behind
✅ `make lint check-gazelle check-tidy`
@roychying
roychying force-pushed the preetam/github-merger-integ branch from 8f983c6 to 9e066a9 Compare October 8, 2026 17:14
@roychying
roychying added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 2febf54 Oct 8, 2026
19 checks passed
@roychying
roychying deleted the preetam/github-merger-integ branch October 8, 2026 17:26
Tmwakalasya pushed a commit to Tmwakalasya/submitqueue that referenced this pull request Oct 8, 2026
## Summary

### Why?

Runway can only merge through a local `git` checkout. On github.com we
want GitHub to do the merge, so that branch rules, PR state and stack
rebasing stay GitHub's, including for native stacked PRs.

### What?

- New `runway/extension/merger/github`: each step is one GitHub stack,
landed atomically with `PUT /pulls/{top}/merge-async` and then polled.
- Lists that are not a GitHub stack based on the target are rejected at
the mergeability check. `Merge` re-checks them before submitting.
- Outputs are each PR's merge commit, read from its `merged` issue
event, since API 2026-03-10 nulls `merge_commit_sha`.
- Redelivery is safe: merged PRs are skipped, an in-flight request (409)
is adopted, and a pending merge is retryable via `Classifier`.
- Auth comes from the injected `*http.Client`. Runway config gains
`type: github`, and runway now classifies HTTP errors.
- Atomicity is per step, not per batch (see README).

## Test Plan

✅ `bazel test //runway/... //service/runway/...` against a fake GitHub,
plus config and disposition tests
✅ API behaviour confirmed with probes against github.com
✅ `make lint check-gazelle check-tidy`


## Stack
1. @ uber#807
1. uber#808

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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