<#881 Filter non-user files from ImportError diagn...
# flyte-github
a
#881 Filter non-user files from ImportError diagnostics Pull request opened by pingsutw Summary • The
[ImportError Diagnostics]
message previously listed ALL files under the working directory, including thousands of irrelevant files from
.local/share/uv/python/
,
venv
,
site-packages
,
__pycache__
, etc. • Extracted a
_list_user_files()
helper that prunes non-user directories during
os.walk
, reusing
STANDARD_IGNORE_PATTERNS
from
_code_bundle._ignore
plus runtime-specific dirs (
.local
,
.uv
,
site-packages
,
dist-packages
, etc.) • Deduplicated the file-listing logic between
entrypoints.py
and
serve.py
Test plan • Added 6 unit tests covering filtering of venv, .venv, .local, .uv, pycache, .git, site-packages, empty dirs, and files-only output • Verify diagnostics output on a real ModuleNotFoundError in a container environment flyteorg/flyte-sdk