feat(api): churn filter modes for admin job events #950

Merged
chris merged 2 commits from feat/admin-logs-processing-api into main 2026-09-28 23:05:49 +02:00
Owner

Summary

Adds an optional churn query param to GET /api/admin/job-events (super-admin):

  • absent: byte-for-byte legacy behavior (churn types excluded unless status=failed or explicit jobType)
  • churn=include: never applies the churn exclusion
  • churn=only: feed restricted to media-processing job types (thumbnails, previews, metadata, detection); album/retrospective/export run sources are not built at all
  • any other value → 400 Invalid request (same convention as status validation)

Single branch structure in the SQL construction, no UNION duplication. Degenerate churn=only&jobType=<run type> short-circuits to an empty page (avoids empty-UNION SQL).

Motivation

Admin Logs currently hides all media-processing completions (thumbnail/preview/metadata jobs are churn-excluded), so there is no way to see when a photo was processed. A following web PR adds a Processing section to the Admin Logs tab using churn=only.

Test plan

  • JobEventsServiceTest: 13/13 green (legacy assertions untouched; +3 new: include mixes sources, only returns exclusively churn worker jobs with all three run tables seeded, invalid modes rejected incl. case/whitespace)
  • JobEventsControllerTest: 5/5 green (+2: param forwarding, MockMvc 400 on invalid churn)
  • rtk ./gradlew :apps:api:compileJava :apps:api:compileTestJava clean

Version bump 1.21.57.

## Summary Adds an optional `churn` query param to `GET /api/admin/job-events` (super-admin): - **absent**: byte-for-byte legacy behavior (churn types excluded unless `status=failed` or explicit `jobType`) - **churn=include**: never applies the churn exclusion - **churn=only**: feed restricted to media-processing job types (thumbnails, previews, metadata, detection); album/retrospective/export run sources are not built at all - any other value → 400 `Invalid request` (same convention as `status` validation) Single branch structure in the SQL construction, no UNION duplication. Degenerate `churn=only&jobType=<run type>` short-circuits to an empty page (avoids empty-UNION SQL). ## Motivation Admin Logs currently hides all media-processing completions (thumbnail/preview/metadata jobs are churn-excluded), so there is no way to see when a photo was processed. A following web PR adds a Processing section to the Admin Logs tab using `churn=only`. ## Test plan - `JobEventsServiceTest`: 13/13 green (legacy assertions untouched; +3 new: include mixes sources, only returns exclusively churn worker jobs with all three run tables seeded, invalid modes rejected incl. case/whitespace) - `JobEventsControllerTest`: 5/5 green (+2: param forwarding, MockMvc 400 on invalid churn) - `rtk ./gradlew :apps:api:compileJava :apps:api:compileTestJava` clean Version bump 1.21.57.
feat(api): add churn modes to admin job events
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 10s
Build and Deploy / Android unit tests and debug APK (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 postgres image (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 45m48s
05eeca2e4c
chore: version bump 1.21.57
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 8s
Build and Deploy / Android unit tests and debug APK (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 postgres image (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 18m28s
0270efda9b
chris merged commit 30b3572adb into main 2026-09-28 23:05:49 +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!950
No description provided.