FEAT: Added MOre Video Statuses
Build, Push and Deploy CMS / build-push-deploy (push) Failing after 2m2s
Build, Push and Deploy CMS / build-push-deploy (push) Failing after 2m2s
This commit is contained in:
@@ -90,6 +90,13 @@ nothing is fetched from a CDN at runtime.
|
||||
|
||||
Handlers live in `cms/internal/handlers` — `handlers.go` holds `Health` and
|
||||
the shared response writers, `videos.go` the categories and upload endpoints.
|
||||
The request/response bodies they serve are *not* in that package: every wire
|
||||
struct lives in `cms/internal/api` (`api.go` for `HealthResponse` and
|
||||
`ProblemDetails`, `videos.go` for the rest), exported and referenced by the
|
||||
handlers' swaggo annotations as `api.VideoResponse` and so on — so the
|
||||
generated spec's definition names track that package, and renaming a type
|
||||
there changes the published schema names.
|
||||
|
||||
There is no view layer: the `internal/views` templ package, the `static/`
|
||||
directory, and the htmx frontend were all removed when the service became a
|
||||
JSON API, along with the `templ` dependency.
|
||||
@@ -111,6 +118,12 @@ it ever matters.
|
||||
(free-text, comma-separated — not normalized), `file_name`, `storage_key`
|
||||
(the S3 key, unique), `mediaconvert_job_id`, `status` (written once as
|
||||
`"processing"` on insert — see Known gaps), `size_bytes`, timestamps.
|
||||
`status` is an enum on both sides: the `services.VideoStatus` string type
|
||||
in `cms/internal/services/status.go` (`processing`, `ready`, `failed`) and
|
||||
the `videos_status_check` CHECK constraint added by migration `0003`.
|
||||
Extending it means adding a constant there, widening the constraint in a
|
||||
new migration, and extending the `enums` annotation on
|
||||
`api.VideoResponse.Status` before regenerating the spec.
|
||||
`id` is a `UUID` generated application-side as a UUIDv7
|
||||
(`uuid.NewV7()` in `services.DBConcrete.CreateVideo`) rather than via the
|
||||
column's own `DEFAULT gen_random_uuid()` (which generates v4 and is never
|
||||
@@ -219,8 +232,9 @@ on boot if any required var is empty.
|
||||
and configures no custom MediaConvert endpoint — relies on the SDK's
|
||||
default regional endpoint.
|
||||
- No MediaConvert completion webhook or poller exists — a `videos.status`
|
||||
row is written once as `"processing"` in `CreateVideo` and never updated,
|
||||
even after the transcode job actually finishes or fails.
|
||||
row is written once as `VideoStatusProcessing` in `CreateVideo` and never
|
||||
updated, even after the transcode job actually finishes or fails. The
|
||||
`ready` and `failed` states are defined but nothing sets them yet.
|
||||
- `discovery` has infra provisioned (ECR repo, ECS service, ALB, Postgres
|
||||
DB/role) but no application code — it doesn't touch its database at all.
|
||||
- No automated tests exist for `cms`, `discovery`, or `infrastructure`.
|
||||
|
||||
Reference in New Issue
Block a user