fix: skip files that vanish before being added to code bundle#1195
Open
EngHabu wants to merge 1 commit into
Open
fix: skip files that vanish before being added to code bundle#1195EngHabu wants to merge 1 commit into
EngHabu wants to merge 1 commit into
Conversation
EngHabu
commented
Jun 11, 2026
EngHabu
left a comment
Contributor
Author
There was a problem hiding this comment.
LGTM.. I'm guessing some of these maybe symlinked or something?
The code bundle file list is computed by walking the source tree, but a file can disappear between listing and tar.add stat-ing it — most commonly a transient lock file (e.g. .codegraph/codegraph.lock). This raised a raw FileNotFoundError that aborted the entire deploy (FLYTE-SDK-52). A vanished file is an environment race, not an SDK bug, so skip it with a warning and continue producing the bundle. fixes FLYTE-SDK-52 Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
fec58d4 to
c11258f
Compare
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.
Problem
The code bundle file list (
ls) is computed by walking the source tree, but a file can disappear between listing andtar.addstat-ing it — most commonly a transient lock file (e.g..codegraph/codegraph.lock). This raised a rawFileNotFoundErrorintarfile.gettarinfothat aborted the entire deploy.Sentry: FLYTE-SDK-52 —
FileNotFoundError: [Errno 2] No such file or directory: '.../.codegraph/codegraph.lock'(culprittarfile in gettarinfo, via_packaging.create_bundle).Fix
Wrap
tar.addin atry/except FileNotFoundErrorthat logs a warning and skips the vanished file. A file disappearing mid-bundle is an environment race, not an SDK bug, and shouldn't abort the whole deploy — the rest of the bundle is still produced.Tests
test_create_bundle_skips_files_that_vanish_before_add— a file present in the list but missing on disk is skipped; the bundle is still produced with the remaining files.fixes FLYTE-SDK-52