Repository navigation
Conversation
On prod, kubectl exec sometimes waits forever after the pod-side script is gone, stalling a sheet's prepare for hours. Lookup, stage and fill calls now die after POD_TIMEOUT, retry once, then stop the step cleanly. The import call keeps no timeout since rerunning it would make a second importer. Assisted by: Opus 5.5
kirkkwang
force-pushed
the
migration-pod-timeout
branch
from
October 15, 2026 17:47
45b6d35 to
2ca6cdd
Compare
The lookup stop named only the first five unmatched identifiers, so a sheet missing 27 looked like it was missing 5. The full list now goes to tmp/migration/out/<sheet>-unmatched.txt. Assisted by: Opus 5.5
A PDF or intermediate file set whose thumbnail fails to stage arrives with no thumbnail, so the import regenerates all its derivatives. Its failed uploads no longer stop the prepare; any other failure still does. Assisted by: Opus 5.5
A dropped S3 connection raised out of the pod's download script, so Fill lost the batch's 200 results and stopped. Each download now reports its own failure and the batch carries on. Assisted by: Opus 5.5
A rerun rechecked every original and derivative, about an hour on a 92k file set sheet. A progress file now records finished steps and how many file sets staging and fill got through, keyed by target and input so a changed sheet or destination starts over. --recheck ignores it. Assisted by: Opus 5.5
kirkkwang
force-pushed
the
migration-pod-timeout
branch
from
October 16, 2026 13:24
b331a57 to
3480a90
Compare
Seven prepares at once took legacy's web pods down. Each exec into legacy now holds one of LEGACY_SLOTS (default 2) file locks shared by every prepare on the machine, and waits for a free one. Upload URLs are signed after the slot is taken, so a long wait cannot expire them. Assisted by: Opus 5.5
This branch has not been deployed
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.
Story
🐛 Time out and retry a hung kubectl exec in migration
e77eab4
On prod, kubectl exec sometimes waits forever after the pod-side script is
gone, stalling a sheet's prepare for hours. Lookup, stage and fill calls
now die after POD_TIMEOUT, retry once, then stop the step cleanly. The
import call keeps no timeout since rerunning it would make a second importer.
Assisted by: Opus 5.5
🎁 Write every unmatched identifier to a file
d769108
The lookup stop named only the first five unmatched identifiers, so a
sheet missing 27 looked like it was missing 5. The full list now goes
to tmp/migration/out/-unmatched.txt.
Assisted by: Opus 5.5
🐛 Continue past failed derivatives the import regenerates
42ffc2a
A PDF or intermediate file set whose thumbnail fails to stage arrives
with no thumbnail, so the import regenerates all its derivatives. Its
failed uploads no longer stop the prepare; any other failure still does.
Assisted by: Opus 5.5
🐛 Fail one derivative download, not the whole batch
af29c07
A dropped S3 connection raised out of the pod's download script, so
Fill lost the batch's 200 results and stopped. Each download now
reports its own failure and the batch carries on.
Assisted by: Opus 5.5
🎁 Resume a prepare from where the last run stopped
3480a90
A rerun rechecked every original and derivative, about an hour on a
92k file set sheet. A progress file now records finished steps and how
many file sets staging and fill got through, keyed by target and input
so a changed sheet or destination starts over. --recheck ignores it.
Assisted by: Opus 5.5
🐛 Cap concurrent kubectl execs into legacy
db36159
Seven prepares at once took legacy's web pods down. Each exec into
legacy now holds one of LEGACY_SLOTS (default 2) file locks shared by
every prepare on the machine, and waits for a free one.
Upload URLs are signed after the slot is taken, so a long wait cannot
expire them.
Assisted by: Opus 5.5
Expected Behavior Before Changes
kubectl execthat hung duringprepare_sheet(lookup, staging, fill) waited forever; on prod it stalled sheets for 1 to 2 hours.Expected Behavior After Changes
POD_TIMEOUTseconds (default 1800), retried once, then stops the step with a clear message.import_sheetis unchanged.tmp/migration/out/<sheet>-unmatched.txt.tmp/migration/out/<sheet>-progress.json);--recheckchecks everything again.LEGACY_SLOTS(default 2) execs run against legacy at once across every prepare on the machine; the rest wait and say so.Screenshots / Video
None: command-line only
Notes
cd bin/migration && bundle exec rspec: 57 examples pass. The legacy slot wait, the retry, the non-blocking stdin write, the regeneration filter, the stale-thumbnail guard the per-file download rescue and every progress guard were each mutation-tested.🤖 Generated with Claude Code
https://claude.ai/code/session_014ZtPeRZ48cbc5NSvJKCDxT