Spring Boot ignores Ordered on TemporalOptionsCustomizer beans

Ouverte
#3,244 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Quinn-With-Two-Ns y travaille déjà.

Depuis le 1/12/2026.

  • #3246 par @Quinn-With-Two-Ns — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
java, spring-boot
Domaine
backend

Piste de recherche

Read AutoConfigurationUtils.chooseTemporalCustomizerBeans and its shared comparator, then inspect the tests for WorkflowClient, ScheduleClient, and ActivityClient options. Check how Ordered#getOrder(), @Order, @Priority, and @Bean method annotations are handled. Done means the repro customizers run in ascending order while annotation support continues to pass.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

Expected Behavior

Spring Boot auto-configuration runs TemporalOptionsCustomizer beans in ascending Ordered#getOrder() order, regardless of bean registration order. TemporalOptionsCustomizer documents support for both Ordered and @Order.

Actual Behavior

When two customizers implement Ordered without annotations and are registered with order values 20 then 10, they run in registration order (20, 10) instead of order-value order (10, 20). Verified for root WorkflowClient, ScheduleClient, and ActivityClient options. The existing @Order test still passes.

AutoConfigurationUtils.chooseTemporalCustomizerBeans sorts map entries. Its comparator looks up @Order and @Priority on the underlying beans, but does not use Ordered#getOrder() on the customizer instances. The shared comparator should handle Ordered while preserving annotation support, including @Order on @Bean methods.

Steps to Reproduce the Problem

  1. Start an ApplicationContextRunner with Temporal's service stubs and root namespace auto-configurations and spring.temporal.connection.target=local.
  2. Register two beans implementing TemporalOptionsCustomizer<WorkflowClientOptions.Builder> and Ordered. Have each record its order value in a shared list from customize and return the builder unchanged. Register the bean with order 20 first, then the one with order 10; do not annotate either bean with @Order.
  3. Start the context and inspect the list: it is [20, 10], not [10, 20]. The same repro works with ScheduleClientOptions.Builder and, on #3157, ActivityClientOptions.Builder.

Specifications

  • Reproduced on #3157 (04f208e7) with Spring Boot 2.7.18. The same shared comparator is present on main (b9f92567).
  • Platform: macOS, JDK 21.

Reported in review of #3157. Follow-up to #2638 / #2649.

Langage dominant
Java
Étoiles
447
Forks
278
Merge moyen
3 j 22 h
PR mergées (30 j)
28

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de temporalio/sdk-java

Toutes les issues de temporalio/sdk-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.