mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
infra: give audio-download-job the Tornado key
That job does most YouTube downloads, and it gets its secrets from Pulumi rather than CI's API deploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RYLVTvqXyL4QyA2EjzQMG
This commit is contained in:
1 parent
ca05245469
commit
6decde66b9
3 files changed
+14
-2
No files matched your search
@@ -705,7 +705,7 @@ Audio can come from file upload or remote search (YouTube, torrents). All YouTub
|
||||
2026-09-26; the backend and `audio-download-job` / `bulk-search-job` have no VPC egress, so every
|
||||
dependency they call must be reachable on a public address.
|
||||
- `FLACFETCH_API_KEY` - API key for authentication
|
||||
- `TORNADO_API_KEY` - TornadoAPI key (secret `tornado-api-key`). When set, YouTube downloads and availability checks try Tornado first and fall back to flacfetch: WARNING per failed download, ERROR if the account is rejected. CI wires the secret once it has a version. It covers downloads only, so YouTube search still uses flacfetch's cookies.
|
||||
- `TORNADO_API_KEY` - TornadoAPI key (secret `tornado-api-key`). When set, YouTube downloads and availability checks try Tornado first and fall back to flacfetch: WARNING per failed download, ERROR if the account is rejected. The secret was created by hand (not in `secrets.py`). CI wires it on the API service once it has a version; Pulumi wires it on `audio-download-job`, which does most YouTube downloads. It covers downloads only, so YouTube search still uses flacfetch's cookies.
|
||||
- `YOUTUBE_DOWNLOAD_PROVIDER` - set to `flacfetch` to switch Tornado off, e.g. `gcloud run services update karaoke-backend --update-env-vars YOUTUBE_DOWNLOAD_PROVIDER=flacfetch` (default `tornado`; the next CI deploy resets it, so also change the workflow to make it permanent).
|
||||
|
||||
## Worker Execution
|
||||
|
||||
@@ -516,6 +516,18 @@ def create_audio_download_job(
|
||||
),
|
||||
),
|
||||
),
|
||||
# TornadoAPI key: YouTube downloads try Tornado first, flacfetch is
|
||||
# the fallback (backend/services/youtube_download_service.py). This job
|
||||
# does most YouTube downloads; CI wires the same secret on the API service.
|
||||
cloudrunv2.JobTemplateTemplateContainerEnvArgs(
|
||||
name="TORNADO_API_KEY",
|
||||
value_source=cloudrunv2.JobTemplateTemplateContainerEnvValueSourceArgs(
|
||||
secret_key_ref=cloudrunv2.JobTemplateTemplateContainerEnvValueSourceSecretKeyRefArgs(
|
||||
secret=f"projects/{PROJECT_ID}/secrets/tornado-api-key",
|
||||
version="latest",
|
||||
),
|
||||
),
|
||||
),
|
||||
# Flacfetch API URL (public HTTPS endpoint; no VPC egress)
|
||||
cloudrunv2.JobTemplateTemplateContainerEnvArgs(
|
||||
name="FLACFETCH_API_URL",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "karaoke-gen"
|
||||
version = "0.291.0"
|
||||
version = "0.291.1"
|
||||
description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
|
||||
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
|
||||
license = "MIT"
|
||||
|
||||
Reference in new issue
Block a user