Fix/s3 no file#3215
Conversation
…directory When a code package is extracted to dest_dir/ and metaflow is loaded via PYTHONPATH pointing to dest_dir/.mf_code/, get_metaflow_root() returns dest_dir/.mf_code rather than dest_dir/. The MFCONTENT_MARKER (.mf_install) is placed at the archive root (dest_dir/), so the lookup missed it, leaving mfcontent_info=None and bypassing the V1 INFO file mechanism. Add a fallback in _extract_mfcontent_info() to also check the parent of get_metaflow_root() when METAFLOW_EXTRACTED_ROOT is not set. This allows the V1 class to be selected and _get_otherfile_path() to locate dest_dir/.mf_meta/INFO, triggering the early return in _get_extension_packages() that skips the implicit namespace package check.
Greptile SummaryThis PR adds a targeted fallback path in
Confidence Score: 5/5Safe to merge; the change is a narrow, well-commented fallback that is unreachable unless the primary path lookup already failed. The fix is a one-level parent-directory check behind an No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "Revert a fix that is causing more issues" | Re-trigger Greptile |
PR Type
Summary
Small fix for the handling of .mf_code.