<#1195 fix: skip files that vanish before being ad...
# flyte-github
a
#1195 fix: skip files that vanish before being added to code bundle Pull request opened by EngHabu Problem The code bundle file list (
ls
) 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
in
tarfile.gettarinfo
that aborted the entire deploy. Sentry: FLYTE-SDK-52 —
FileNotFoundError: [Errno 2] No such file or directory: '.../.codegraph/codegraph.lock'
(culprit
tarfile in gettarinfo
, via
_packaging.create_bundle
). Fix Wrap
tar.add
in a
try/except FileNotFoundError
that 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 flyteorg/flyte-sdk