Repository navigation
fix(tts-audio): give the synthesis Job the Admin key it needs - #288
Open
sredevopsorgagents wants to merge 2 commits into
Open
sredevopsorgagents wants to merge 2 commits into
sredevopsorgagents wants to merge 2 commits into
Conversation
added 2 commits
November 28, 2026 03:53
Every synthesis Job started, pulled its image successfully, went Running, and then died immediately with `missing configuration: adminKey`. The Secret holds `admin-api-key`, and the job template consumed it with `envFrom: secretRef`, which turns that key into `ADMIN_API_KEY`. The worker reads `GHOST_ADMIN_API_KEY`, so the value never arrived. The receiver pod was never affected because its Deployment maps the key explicitly — the Job relied on `envFrom` and had no mapping at all. Found by actually running one post end to end. Nothing about the manifest looks wrong, the image pull succeeds, and the failure surfaces as a config error from inside the container, which reads like a build problem. Now mapped explicitly, and test.sh asserts the Secret name, key and env var match. Verified against a regression that removes the mapping. Related operational trap, documented in the README: the receiver caches job-template.json in memory for its lifetime (`cachedTemplate` in k8s.mjs), so editing the tts-job-template ConfigMap has NO effect until the receiver restarts. Applying a template fix and immediately re-running the backfill reproduces the old behaviour exactly.
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.
Found by queueing one post end to end after #287 merged.
The bug
Every synthesis Job started, pulled its image, went
Running, then died immediately:The Secret holds
admin-api-key, and the job template consumed it withenvFrom: secretRef— which turns that key intoADMIN_API_KEY. The worker readsGHOST_ADMIN_API_KEY, so the value never arrived.The receiver was never affected because its Deployment maps the key explicitly. The Job relied on
envFromand had no mapping at all. Nothing about the manifest looks wrong, the image pull succeeds, and the failure surfaces as a config error from inside the container — it reads like a build problem.Now mapped explicitly;
test.shasserts the Secret name, key and env var all match.The trap that made it confusing
While chasing this I hit a second, quiet problem worth documenting: the receiver caches
job-template.jsonin memory for its lifetime (cachedTemplateink8s.mjs). Applying a ConfigMap fix and immediately re-running produces exactly the old failure — which looks like the fix never worked. It had; it was never loaded.kubectl rollout restartis required, and the README now says so in the Operating section.I made this mistake myself: applied the fix, retried, saw the identical error, and only then noticed the deployed Job spec still had three env vars.
Verified end to end
One post, from queue to playable audio, on the deployed image:
gs://tts-sredevopsorg/audio/6b07a48a.../d7e24de7b382cd88.mp3→ 8.76 MB, 12:10, 96 kbps, 24 kHz mono,audio/mpeg,immutableffprobe, not just the upload logdeploy/tts-audio/test.sh✅ (93 worker tests) — the new assertion checked against a regression that removes the mapping.Not fixed here
AUDIO_BASE_URLpoints athttps://audio.sredevops.org, which returns GCSNoSuchBucket— the hostname maps to a bucket that does not exist. The object itself serves fine fromhttps://storage.googleapis.com/tts-sredevopsorg/...and that URL passes CORS, so this is a DNS/GCS-mapping problem, not a pipeline one. It needs Cloudflare/GCS admin access, which this repo does not have; flagged for a follow-up.