Repository navigation
Feat/transcoding hardening - #13
Merged
Merged
Conversation
Configure bounded transcode worker and scheduler pools with shutdown and rejection policies. Expose queue and thread settings through application properties for production tuning. Refs: streamfolio-transcoding-hardening
Add retry and cancellation states required by the persistent transcode queue. Keep terminal states explicit so schedulers and admin actions can reason safely. Refs: streamfolio-transcoding-hardening
Persist attempts, retry scheduling, cancellation requests and worker heartbeats on transcode jobs. Expose domain methods for schedulers, manual retry and controlled cancellation. Refs: streamfolio-transcoding-hardening
Expose runnable, stale and status-based transcode job queries for the scheduler. Keep entity graphs on worker-facing reads to avoid lazy loading surprises in async workers. Refs: streamfolio-transcoding-hardening
Return attempts, retry timing and cancellation flags from admin job APIs. Allow the admin UI and E2E tests to assert persistent queue behavior. Refs: streamfolio-transcoding-hardening
Introduce a dedicated runtime exception for cooperative cancellation. Keep cancellation handling separate from technical failures and retry logic. Refs: streamfolio-transcoding-hardening
Track cancellation requests in memory while persisting the authoritative flag on each job. Allow running FFmpeg commands to be stopped without waiting for their timeout. Refs: streamfolio-transcoding-hardening
Add a cooperative cancellation token to FFmpeg execution. Destroy running processes promptly when an admin cancellation is requested. Refs: streamfolio-transcoding-hardening
Add the minio enum value to prepare object storage backed media delivery. Refs: streamfolio-transcoding-hardening
Handle retryable failures with exponential backoff and track parent progress from child jobs. Separate cancelled jobs from failed jobs so manual retry stays explicit. Refs: streamfolio-transcoding-hardening
Add admin-facing cancellation and manual retry operations. Expose scheduler hooks for runnable jobs and interrupted backend restart recovery. Refs: streamfolio-transcoding-hardening
Dispatch pending and retrying jobs from the database queue on a fixed cadence. Recover interrupted running jobs when the backend starts after a crash or restart. Refs: streamfolio-transcoding-hardening
Add admin endpoints to stop running jobs and manually relaunch failed or cancelled jobs. Keep the existing transcode submission contract unchanged. Refs: streamfolio-transcoding-hardening
Add publication, retry, cancellation and heartbeat columns to PostgreSQL schema. Update transcode status constraints to match the persistent queue state machine. Refs: streamfolio-transcoding-hardening
Persist DRAFT and PUBLISHED states directly on videos with a safe published default. Keep existing demo videos visible while enabling admin controlled publication later. Refs: streamfolio-transcoding-hardening
Return each video's DRAFT or PUBLISHED state from admin video APIs. Refs: streamfolio-transcoding-hardening
Allow admin video updates to carry the publication state alongside metadata fields. Refs: streamfolio-transcoding-hardening
Align package metadata with README and Maven release version. Refs: streamfolio-transcoding-hardening
Prepare real object storage integration through the MinIO Java client. Keep Streamfolio release metadata aligned with README and package metadata. Refs: streamfolio-transcoding-hardening
Create a focused gateway for bucket creation, object reads, object probes and path uploads. Use the MinIO Java SDK behind a Spring conditional so local profiles remain lightweight. Refs: streamfolio-transcoding-hardening
Serve media from MinIO when configured while preserving local disk as staging fallback. Publish original and derived media trees to object storage without disabling local-media workflows. Refs: streamfolio-transcoding-hardening
Keep storage mode tests stable while accepting the new MinIO mode. Refs: streamfolio-transcoding-hardening
Document runtime properties for MinIO, HLS policy and persistent queue scheduling. Keep defaults safe for local classpath development. Refs: streamfolio-transcoding-hardening
Keep local HTTP development on non-secure cookies and local media staging. Disable MinIO by default for the local profile. Refs: streamfolio-transcoding-hardening
Enable secure cookies, PostgreSQL validation, Redis sessions and MinIO media storage for production. Keep every production secret externalized through environment variables. Refs: streamfolio-transcoding-hardening
Use MinIO object storage for Docker while keeping local disk as FFmpeg staging storage. Keep PostgreSQL and Redis settings aligned with the compose services. Refs: streamfolio-transcoding-hardening
Allow FFmpeg to use local staging when the configured media storage is MinIO. Publish generated HLS and thumbnail outputs to the object store after validation. Refs: streamfolio-transcoding-hardening
Run the complete validation pipeline after merges or pushes to main. Publish validation and Playwright artifacts to ease post-merge diagnostics. Refs: streamfolio-transcoding-hardening
Document secure cookies, Redis durability, MinIO media storage and the hardened transcode queue. Keep README version metadata aligned with Maven and package metadata. Refs: streamfolio-transcoding-hardening
Avoid overstating original upload mirroring until upload-side publication is fully wired. Document the current local staging plus MinIO derived output behavior. Refs: streamfolio-transcoding-hardening
Cast the test-oriented constructor fallback to MinioMediaGateway so Java does not confuse it with the Spring ObjectProvider constructor. This restores compilation for direct two-argument instantiation in unit tests. Refs: streamfolio-transcoding-hardening
Declare OkHttp explicitly so MinIO public APIs compile consistently with Spring Boot dependency management. This fixes missing okhttp3.HttpUrl and okhttp3.MediaType classes during Maven compilation. Refs: streamfolio-transcoding-hardening
Restore the four-argument constructor used by existing unit tests while keeping the Spring constructor configurable. This avoids test compile regressions after adding retry delay properties. Refs: streamfolio-transcoding-hardening
Mark the configurable constructor as the Spring injection point because the class also exposes a short constructor for unit tests. This prevents Spring from trying to instantiate the worker with a missing no-arg constructor. Refs: streamfolio-transcoding-hardening
Update the worker failure test to assert the new retrying state after a retryable FFmpeg error. Add a separate terminal failure assertion when no retry attempt remains. Refs: streamfolio-transcoding-hardening
Guard scheduled transcode dispatch once the Spring context is closing and downgrade shutdown race exceptions to debug logs. This prevents H2 shutdown races from polluting successful test validation logs. Refs: streamfolio-transcoding-hardening
Configure the transcode scheduler to stop periodic work immediately when the application shuts down. Keep worker shutdown graceful while preventing scheduled database polling after the persistence context closes. Refs: streamfolio-transcoding-hardening
Suppress curl stderr while the smoke test retries login during startup and print an explicit error only after all attempts fail. This removes expected HTTP 401 noise from successful validation runs. Refs: streamfolio-transcoding-hardening
Exclude Spring Boot's default user details auto-configuration because Streamfolio uses its own cookie and repository-backed authentication flow. This removes generated development password warnings from startup logs. Refs: streamfolio-transcoding-hardening
Revert the direct UserDetailsServiceAutoConfiguration exclusion because its package is not stable across Spring Boot versions. A dedicated no-op UserDetailsService bean prevents generated default users without tying the application class to an auto-configuration package. Refs: streamfolio-transcoding-hardening
Add a no-op UserDetailsService bean so Spring Security does not generate a development password. Streamfolio authentication remains handled by AuthService and the session cookie filter. Refs: streamfolio-transcoding-hardening
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.