fix(api): autowire multi-constructor beans (hotfix part 2) #1115

Merged
chris merged 1 commit from fix/spring-multi-ctor-autowire into main 2026-10-11 15:54:40 +02:00
Owner

Hotfix part 2

Deploy run 4109 failed at Deploy API with NoSuchMethodException: AdminBootstrapService.<init>() — the same failure family as #1113 (StorageAvailabilityService): package-private test-seam constructors disable Spring's implicit single-constructor autowiring, so Spring looks up the no-arg constructor and startup fails.

Fixed in this PR:

  • AdminBootstrapService: @Autowired on the public production constructor (3 constructors total)
  • StoragePathsAdminController: @Autowired on the public production constructor (would have been the next startup failure)

A repo-wide scan of all @Service/@Component/@RestController/@Configuration classes found no further multi-constructor beans without @Autowired.

Validation: rtk ./gradlew :apps:api:compileJava + storage/setup test packages green; rescan clean.

Follow-up (non-blocking): add a @SpringBootTest context-load smoke test so wiring failures are caught pre-deploy instead of during the live Deploy API job.

## Hotfix part 2 Deploy run 4109 failed at Deploy API with `NoSuchMethodException: AdminBootstrapService.<init>()` — the same failure family as #1113 (StorageAvailabilityService): package-private test-seam constructors disable Spring's implicit single-constructor autowiring, so Spring looks up the no-arg constructor and startup fails. Fixed in this PR: - `AdminBootstrapService`: `@Autowired` on the public production constructor (3 constructors total) - `StoragePathsAdminController`: `@Autowired` on the public production constructor (would have been the next startup failure) A repo-wide scan of all `@Service`/`@Component`/`@RestController`/`@Configuration` classes found **no further** multi-constructor beans without `@Autowired`. **Validation:** `rtk ./gradlew :apps:api:compileJava` + storage/setup test packages green; rescan clean. Follow-up (non-blocking): add a `@SpringBootTest` context-load smoke test so wiring failures are caught pre-deploy instead of during the live Deploy API job.
fix(api): autowire multi-constructor beans (AdminBootstrapService, StoragePathsAdminController)
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 4s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 6m18s
c1c8c460cb
Same class of failure as the StorageAvailabilityService hotfix: package-private
test-seam constructors disable Spring's implicit single-constructor detection,
so startup failed with 'No default constructor found' during the deploy smoke.
A repo-wide scan found no further Spring beans with multiple constructors and
missing @Autowired.
chris merged commit ca8ca101ae into main 2026-10-11 15:54:40 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1115
No description provided.