fix(api): autowire StorageAvailabilityService 2-arg constructor (hotfix) #1113

Merged
chris merged 1 commit from fix/storage-availability-constructor into main 2026-10-11 15:21:29 +02:00
Owner

Hotfix

The spec-054 deploy (9005dcef) crash-looped the live API:

NoSuchMethodException: StorageAvailabilityService.<init>() — the fix-forward round added a public 3-arg test-seam constructor, which disables Spring Boot's implicit single-constructor autowiring. Spring then looked up the no-arg constructor and failed, so the API never became healthy and the CI deploy run 4097 failed at Deploy API.

Unit tests stayed green because they construct the service with new and never boot the full application context.

Fix: @Autowired on the 2-arg production constructor (one file).

Validation: :apps:api:compileJava + storage/setup/operator test packages green.

Follow-up tracked separately: a context-load smoke test (@SpringBootTest) would catch this class of wiring failure before deploy.

## Hotfix The spec-054 deploy (9005dcef) crash-looped the live API: `NoSuchMethodException: StorageAvailabilityService.<init>()` — the fix-forward round added a public 3-arg test-seam constructor, which disables Spring Boot's implicit single-constructor autowiring. Spring then looked up the no-arg constructor and failed, so the API never became healthy and the CI deploy run 4097 failed at Deploy API. Unit tests stayed green because they construct the service with `new` and never boot the full application context. **Fix:** `@Autowired` on the 2-arg production constructor (one file). **Validation:** `:apps:api:compileJava` + storage/setup/operator test packages green. Follow-up tracked separately: a context-load smoke test (`@SpringBootTest`) would catch this class of wiring failure before deploy.
fix(api): autowire StorageAvailabilityService 2-arg constructor
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 2s
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 7m14s
153d9c14f0
Two public constructors (3-arg test seam) broke Spring's implicit
single-constructor detection, so startup failed with 'No default
constructor found' after the spec-054 deploy.
chris merged commit 036f7de7fb into main 2026-10-11 15:21:29 +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!1113
No description provided.