Skip to content

Extract clients from onebox.go#10575

Open
stephanos wants to merge 1 commit into
mainfrom
stephanos/rm-onebox-no-frontend-refs
Open

Extract clients from onebox.go#10575
stephanos wants to merge 1 commit into
mainfrom
stephanos/rm-onebox-no-frontend-refs

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Jun 6, 2026

What changed

onebox.go now creates its frontend/admin/operator, history/scheduler, and matching test clients directly from the configured test hosts.

Why?

This removes the fx.Populate references. One step closer to the goal of deleting the separate onebox.go fx graph all-together and making use of the production fx graph from the temporal package instead.

@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch from aad7a7f to 93b572b Compare June 6, 2026 00:45
@stephanos stephanos changed the title Remove frontend refs test hook Create onebox test clients directly Jun 6, 2026
@stephanos stephanos changed the base branch from stephanos/rm-onebox to main June 6, 2026 00:45
@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch from 93b572b to f2ca271 Compare June 6, 2026 00:50
Comment thread tests/testcore/onebox.go
temporal.TraceExportModule,
temporal.ServiceTracingModule,
frontend.Module,
fx.Populate(&namespaceRegistry, &rpcFactory, &historyRawClient, &matchingRawClient, &schedulerClient, &grpcResolver),
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Jun 6, 2026

Choose a reason for hiding this comment

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

Removing these is the goal of this PR.

@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch 11 times, most recently from 58b8046 to a77cd06 Compare June 6, 2026 02:34
@stephanos stephanos changed the title Create onebox test clients directly Extract clients from onebox.go Jun 6, 2026
@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch from a77cd06 to 3429510 Compare June 6, 2026 02:43
Comment thread common/testing/grpcinject/grpcinject.go Outdated
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.

obsolete now

@stephanos stephanos requested a review from chrsmith June 6, 2026 02:44
@stephanos stephanos marked this pull request as ready for review June 6, 2026 02:46
@stephanos stephanos requested review from a team as code owners June 6, 2026 02:46
Comment thread tests/testcore/clients.go
Comment on lines +72 to +75
func (c *clients) OperatorClient() operatorservice.OperatorServiceClient {
c.ensureFrontend()
return c.frontend.operator
}
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.

Most tests don't need all these so they are lazy now.

@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch from 3429510 to 0098273 Compare June 6, 2026 16:31
@stephanos stephanos mentioned this pull request Jun 6, 2026
9 tasks
Comment on lines -375 to -377
s.testCluster.host.grpcClientInterceptor.Set(func(ctx context.Context) context.Context {
return metadata.AppendToOutgoingContext(ctx, "temporal-test-name", s.T().Name())
})
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.

moved this into testcontext

@stephanos stephanos force-pushed the stephanos/rm-onebox-no-frontend-refs branch from 0098273 to 5d26988 Compare June 6, 2026 20:36
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.

1 participant