Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ to docs, or any other relevant information.
project-scoped custom roles, and caller rate limits.

### Fixed
- Spring Boot now honors `mainDataConverter` for the root namespace when additional namespaces are configured.
- Autoscaling workflow pollers now prioritize meaningful sticky backlog up to the sticky pool's
target and use advertised slot capacity to balance sticky and non-sticky admission. Without an
advertised maximum, additional polls of one queue type wait until the other has an active poll.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ static DataConverter chooseDataConverter(
for (Entry<String, DataConverter> dataConverterEntry : dataConverters.entrySet()) {
String beanName = dataConverterEntry.getKey();
DataConverter dataConverter = dataConverterEntry.getValue();
if (beanName.equals("mainDataConverter")) {
continue;
}
// Indicate its non-root namespace data converter, skip it
if (nonRootBeanNames.contains(beanName)) {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import io.temporal.client.WorkflowClient;
import io.temporal.common.converter.DataConverter;
import io.temporal.common.converter.DefaultDataConverter;
import io.temporal.spring.boot.TemporalOptionsCustomizer;
import io.temporal.worker.WorkflowImplementationOptions;
import io.temporal.worker.WorkflowImplementationOptions.Builder;
Expand Down Expand Up @@ -63,9 +66,30 @@ public void shouldContainsNonRootRelatedBean() {
Assertions.assertTrue(beanNames.contains("namespace2" + bindingCustomizerName));
}

@Test
public void usesNamedDataConvertersForRootAndAliasedNamespace() {
WorkflowClient root =
applicationContext.getBean("temporalWorkflowClient", WorkflowClient.class);
WorkflowClient ns1 = applicationContext.getBean("ns1WorkflowClient", WorkflowClient.class);
Assertions.assertSame(
applicationContext.getBean("mainDataConverter"), root.getOptions().getDataConverter());
Assertions.assertSame(
applicationContext.getBean("ns1DataConverter"), ns1.getOptions().getDataConverter());
}

@EnableAutoConfiguration
public static class Configuration {

@Bean
public DataConverter mainDataConverter() {
return DefaultDataConverter.newDefaultInstance();
}

@Bean
public DataConverter ns1DataConverter() {
return DefaultDataConverter.newDefaultInstance();
}

@Bean
public TemporalOptionsCustomizer<WorkflowImplementationOptions.Builder>
workflowImplementationCustomizer() {
Expand Down