Skip to content

Add routing ChangeProvider#273

Merged
behinddwalls merged 1 commit into
mainfrom
routing_change_provider
Jun 25, 2026
Merged

Add routing ChangeProvider#273
behinddwalls merged 1 commit into
mainfrom
routing_change_provider

Conversation

@ubettigole

@ubettigole ubettigole commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

When SubmitQueue wants to support multiple code-review systems, we'll need multiple ChangeProviders, but we don't have a clean way to choose which ChangeProvider to use for a given change URI. I'm adding a routing ChangeProvider, which contains all change providers the server wants to support. The caller can optionally inject as many underlying ChangeProviders as they want, and call the routing ChangeProvider's Get function without worrying about change type. It matches each change URI to the correct ChangeProvider, using the existing ParseChangeID functions that each type of change already exports, and calls the respective Get function to fetch change info. This means each caller of a ChangeProvider doesn't need to maintain logic for choosing which ChangeProvider to use.

I also updated the example main file to use a routing ChangeProvider, containing underlying GitHub and Phabricator providers, where we were previously only using GitHub.

Test Plan

Issue Links

…ispatch

Add a routing ChangeProvider that classifies URIs by change type
(GitHub, Phabricator, git) using the existing ParseChangeID functions,
groups them by matched provider, calls each downstream provider once
with its batch, and reassembles results in the original URI order.

This avoids coupling the ChangeProvider interface to routing concerns
while keeping URI-to-provider matching encapsulated within the routing
package — callers configure which providers are available, but never
touch parse logic.

Update the example orchestrator to use the routing provider with both
GitHub and Phabricator backends, falling back to the fake provider
only when neither token is configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ubettigole ubettigole requested review from a team, behinddwalls and sbalabanov as code owners June 25, 2026 17:07
@behinddwalls behinddwalls added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 0475631 Jun 25, 2026
25 of 27 checks passed
@behinddwalls behinddwalls deleted the routing_change_provider branch June 25, 2026 18:54
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.

2 participants