conductor-oss / conductor-oss/conductor
[BUG] scheduler module fails to start on a Postgres-backed Conductor — unqualified `RetryTemplate` autowire collides with two existing beans
- Dominant language
- Java
- Stars
- 32.2k
- Forks
- 1k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 41
Description
### Describe the bug
## Bug description
`PostgresSchedulerConfiguration` (added in #1064) autowires `RetryTemplate` without `@Qualifier`. With both `postgres-persistence` (defines `postgresRetryTemplate`) and `core` (defines `onTransientErrorRetryTemplate`) on the classpath, Spring sees two candidates and fails to start.
The rest of `postgres-persistence` already uses `@Qualifier("postgresRetryTemplate")` on every `RetryTemplate` injection point (`PostgresConfiguration.java` — 7 occurrences). The scheduler config is the only place that omits it.
## Reproduction
Run the published image against Postgres:
```bash
docker run -d --name conductor-postgres \
-e POSTGRES_USER=conductor -e POSTGRES_PASSWORD=conductor \
--network host postgres:16
docker run -d --name conductor-server \
-e CONFIG_PROP=config-postgres.properties \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/postgres \
--network host conductoross/conductor:3.30.0.rc12
docker logs conductor-server | tail
```
`docker/docker-compose-postgres.yaml` built from `main` reproduces equally.
## Actual behavior
```
APPLICATION FAILED TO START
Error creating bean with name 'schedulerArchivalDAO' defined in class path resource
[org/conductoross/conductor/scheduler/postgres/config/PostgresSchedulerConfiguration.class]:
Unsatisfied dependency expressed through method 'schedulerArchivalDAO' parameter 0:
No qualifying bean of type 'org.springframework.retry.support.RetryTemplate' available:
expected single matching bean but found 2: postgresRetryTemplate, onTransientErrorRetryTemplate
```
Same failure for `schedulerDAO`. Server never reaches `/health`.
## Expected behavior
Server starts; `/api/scheduler/*` is reachable.
## Notes
- Affected: `main` since #1064 (merged 2026-05-04). Verified on `conductoross/conductor:3.30.0.rc12` and `main` at `de11d13f6`.
- `PostgresSchedulerAutoConfigurationSmokeTest` passes because `AbstractSchedulerAutoConfigurationSmokeTest.SharedTestBeans` defines a single `RetryTemplate` — the realistic two-candidate context is not exercised.
- `mysql-persistence` scheduler config should be checked for the same pattern.
Fix: add `@Qualifier("postgresRetryTemplate")` to both `RetryTemplate` parameters in `PostgresSchedulerConfiguration`. Happy to PR.
Contributor guide
Research direction
Start in PostgresSchedulerConfiguration.java and compare its RetryTemplate injection with the qualified injections in PostgresConfiguration.java. Run PostgresAutoConfigurationSmokeTest, then verify a two-candidate RetryTemplate context starts successfully and that the scheduler endpoints are reachable; also check the MySQL scheduler configuration for the same pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql, spring-boot
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100