Rust upload data plane for Divine Blossom media uploads.
divine-upload-server owns:
- resumable upload session lifecycle
- direct chunk uploads to GCS
- upload finalization and canonical blob writes
- audit-log ingress from the Fastly Blossom control plane
- thumbnail and media follow-up hooks
It does not own the Blossom control plane. divine-blossom remains the Fastly-facing service that answers client control-plane requests such as HEAD /upload, validates Blossom auth, and proxies short init and complete calls to this service.
In the approved Divine resumable flow:
https://media.divine.videois the client-facing control planehttps://upload.divine.videois the opaque resumable session data planeuploadUrlvalues returned to clients are server-issued session URLs and must be treated as opaque
The service reads configuration from environment variables:
GCS_BUCKETCDN_BASE_URLUPLOAD_BASE_URLPORTMIGRATION_NSECwhen migration auth is requiredTRANSCODER_URLTRANSCRIBER_URLRESUMABLE_SESSION_TTL_SECSRESUMABLE_CHUNK_SIZERESUMABLE_MAX_REQUEST_BODY_SIZE
RESUMABLE_CHUNK_SIZE is capped to RESUMABLE_MAX_REQUEST_BODY_SIZE before it is advertised in /upload/init, so the published chunk contract cannot exceed the actual request-body limit on upload.divine.video. The default route limit is 1048576 bytes, matching the current production nginx ingress behavior. UPLOAD_ROUTE_MAX_BODY_SIZE is also accepted as a compatibility alias.
Run tests:
cargo test
python3 -m unittest discover -s tests -p 'test_*.py'Run locally:
cargo runThe default local port is 8080.
Phase 1 targets production GKE behind https://upload.divine.video.
The current media follow-up path still points at the existing transcoder endpoint through TRANSCODER_URL. GPU-backed transcoder migration is a separate phase.
The repository CI workflow builds and tests on pull requests, then publishes divine-upload-server to us-central1-docker.pkg.dev/dv-platform-prod/containers-production on pushes to main.
export-video-upload-hashes.py queries both the legacy Cloud Run audit logs and the GKE k8s_container audit logs so historic exports continue to work across the migration.