Repository navigation
fix(transcoder): ack only after successful metadata ready update - #78
Merged
Merged
Conversation
SlavaKuntsov
deleted the
fix/issue-50-ack-only-after-metadata-update
branch
September 18, 2026 21:01
8 tasks done
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.
Closes #50
Summary
process_messagenow raises when the finalupdate_status(video_id, "ready", ...)fails, so the transcoder consumer no longerbasic_acks a message whose video would stay «processing» forever with no retry (issue P1 transcoder: ack message only after successful metadata update #50, from review M7).on_messageclosure inmain()is extracted to a module-levelhandle_message(behavior-identical) so retry/DLQ logic is testable: ack only after successful processing; on failure republish tovideo.uploaded.retrywith incrementedx-retry-count(TTL dead-letters back to the main queue); afterMAX_RETRIESmarkfailed+basic_nack(requeue=False)→ DLX → DLQ.Acceptance criteria
update_status("ready")basic_nack(requeue=False)→ DLX/DLQVerification
uv run --project services/transcoder pytest services/transcoder/tests -q— 25 passeduv run --project services/auth pytest services/auth/tests -q— 18 passedblack --check,flake8,mypy(transcoder) — cleanmake e2e— not run (requires full docker compose stack)Remaining risks
MAX_RETRIES=3, re-uploads idempotent per rendition key) — follow-up candidate for a ready-PATCH-only retry path.