fix(source): preserve original custom_id on cancellation - #601
Merged
Conversation
PlanFileSource.Produce previously created synthetic RequestItems with new UUIDs as CustomID when ctx was cancelled, losing the original custom_id from the input file. This broke the OpenAI batch contract: clients could not match error-file rows back to their input requests. Always read the input line regardless of context state so each item retains its original custom_id for the dispatcher drain path. Fixes #598 Signed-off-by: Jooyeon Mok <jmok@redhat.com>
kind load docker-image passes --all-platforms to ctr import, which fails on Apple Silicon when the OCI index references amd64 manifests not present locally. Use docker save | ctr import (without --all-platforms) as a fallback, and skip loading entirely when the image already exists in the Kind node. Signed-off-by: Jooyeon Mok <jmok@redhat.com>
This was referenced Jul 17, 2026
lioraron
approved these changes
Jul 17, 2026
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.
Why is this PR needed?
After #584 merged, E2E tests (Cancel/InProgress, Cancel/IdempotentRetry, Expiration) regressed in CI (#596, #598, #599). The root cause was
PlanFileSource.Producegenerating synthetic RequestItems with new UUIDs asCustomIDwhen the context was cancelled, breaking the OpenAI batch contract that every input request must appear in the output or error file under its originalcustom_id.What does this PR do?
source_planfile.go: Remove the
ctx.Err()fast-path that skipped I/Oand fabricated a new UUID.
Producenow always reads the input line so eachitem retains its original
custom_id. Context cancellation is still handleddownstream by the dispatcher drain path.
source_planfile_test.go: Update the cancellation unit test to assert that
every produced item carries the original
custom_idfrom the input file(not a synthetic UUID equal to
RequestID).dev-deploy-dispatcher.sh: Work around a Kind/Colima issue where
kind load docker-imagefails on Apple Silicon with multi-platform OCIimages (
content digest ... not found). Usesdocker save | ctr importwithout
--all-platforms, and skips loading if the image already exists inthe node.
How was this tested?
make testpasses)ENABLE_DISPATCHER=true make test-e2e): 53 PASS including Cancel/InProgress, Cancel/IdempotentRetry, Expiration, and all TestDispatcher subtestsChecklist
git commit -s) per DCOmake pre-commit)make test)make test-e2e)Related Issues
Fixes #598
Fixes #596
Fixes #599