Repository navigation
Support aggregate backfills on both clients and add getAggregateBackfillJob - #218
Merged
Merged
Conversation
Wraps AggregateService.GetAggregateBackfillJob so callers can poll a backfill started with triggerAggregateBackfill. gRPC client only, like the trigger call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
triggerAggregateBackfill and getAggregateBackfillJob now work on both clients. AggregateBackfills runs over a small AggregateRpc transport: the gRPC client uses its AggregateService stub, and the HTTP client calls the same RPCs with the Connect protocol, which the API server accepts over plain HTTP (as the chalk CLI does). Connect errors decode to the same status codes as gRPC, so the V2 fallback and error wrapping behave identically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dovie-shalev
marked this pull request as ready for review
November 5, 2026 19:47
Benoy515
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ChalkClient.getAggregateBackfillJob(GetAggregateBackfillJobParams)wrapsAggregateService.GetAggregateBackfillJob, so you can poll a backfill's status (QUEUED,WORKING,COMPLETED,FAILED, ...).triggerAggregateBackfillandgetAggregateBackfillJobnow work on the HTTP client as well as the gRPC client. Previously the HTTP client threw "only supported by the gRPC client".How
AggregateBackfillsnow runs over a small package-privateAggregateRpcinterface (one generic unarycall(MethodDescriptor, request)) instead of a gRPC stub. The trigger logic (V2, legacy fallback, error wrapping) and the new get logic are shared by both clients.AggregateRpc.grpc(stub), using the existing AggregateService stub. No behavior change.application/prototo{apiServer}/chalk.aggregate.v1.AggregateService/<Method>through the existingRequestHandler, so auth, 401 refresh and timeouts are reused. The API server mounts AggregateService as a Connect handler, and thechalk aggregate backfillCLI already calls it this way. Headers mirror the gRPC client's AggregateService calls:x-chalk-server: go-api, env, and no deployment-routing headers.{"code": "invalid_argument", ...}) decode to the sameStatusRuntimeExceptioncodes gRPC throws, so the UNIMPLEMENTED fallback and error wrapping behave identically on both clients.SendRequestParamsgainsheaders(override defaults; null removes) andreturnErrorResponses(so the caller can read the Connect error body).ChalkClient: both methods are now abstract, like the other methods both clients implement. Any third-partyChalkClientimplementation must add them.Testing
TestAggregateBackfillClient: the HTTP test now runs trigger and get against a fake Connect server. It checks the path,application/proto, auth and env headers,x-chalk-server, and that aninvalid_argumenterror surfaces asAggregateBackfillException. The gRPC test also covers get../gradlew test: all tests that don't need credentials pass.TestAllClients,TestChalkClient,TestChalkClientDeploymentTagandTestGrpcClientneedCHALK_CLIENT_ID/CHALK_CLIENT_SECRET, which CI provides.getAggregateBackfillJobwith the HTTP client against a real environment would confirm it.🤖 Generated with Claude Code