Repository navigation
Add Spring Boot auto-configuration for ActivityClient - #3157
Quinn-With-Two-Ns wants to merge 3 commits into
Conversation
|
Hi Quinn, thanks for working on the ActivityClient Spring Boot integration! While reviewing #3157, I noticed that I reproduced this locally on the PR branch by adding a regression test. Both test-server and non-test-server configurations failed because the activity client was missing the tracing interceptor. I then tested a small fix that registers The targeted tests now pass:
The regression test verifies interceptor registration and ordering across root and non-root namespaces. I haven't verified actual span generation end to end. Would you be open to a small follow-up contribution with the fix and regression tests, or would you prefer to incorporate it into your existing PR? Happy to help either way! |
What changed?
temporalActivityClientand namespace/alias-prefixed activity clients, following the existingScheduleClientwiring and capabilities.ActivityClientInterceptorbeans, and orderedTemporalOptionsCustomizer<ActivityClientOptions.Builder>beans, including the existing namespace-specific naming convention.Why?
Applications should be able to inject an
ActivityClientwithout manually reproducing the Spring namespace, converter, and interceptor configuration. Invocation-specific task queues and timeouts remain inStartActivityOptions.Fixes #3146.
Note
Medium Risk
Expands Spring bean surface and constructor signatures in autoconfigure templates; misconfigured customizers or duplicate beans could affect runtime client behavior, but changes mirror existing ScheduleClient patterns.
Overview
Spring Boot now wires
ActivityClientthe same way it already does forScheduleClient: a primarytemporalActivityClientfor the root namespace and<alias-or-namespace>ActivityClientbeans for each configured non-root namespace.ClientTemplatelazily builds clients from shared service stubs (including the test-server path).WorkflowClientOptionsTemplate.createActivityClientOptions()sets namespace and data converter, prepends OpenTracing when aTraceris present, applies rootActivityClientInterceptorbeans only on the root client, and runs orderedTemporalOptionsCustomizer<ActivityClientOptions.Builder>beans (namespace-specific names likeassignActivityClientCustomizerfor non-root). Non-root namespaces register their activity client viaNonRootBeanPostProcessor.Deprecated overloads on
ClientTemplate,NonRootNamespaceTemplate, andWorkflowClientOptionsTemplatethat omitted activity-client parameters were removed. README, changelog, and tests cover injection, customizers, multi-namespace beans, and interceptor ordering.Reviewed by Cursor Bugbot for commit 04f208e. Bugbot is set up for automated code reviews on this repo. Configure here.