Skip to content

fix: metaflow-dev improvements #2527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 9, 2025
Merged

Conversation

saikonen
Copy link
Collaborator

@saikonen saikonen commented Jul 29, 2025

  • enables metaflow-dev up to find the relevant Makefile when metaflow installed with --editable
  • updates both metaflow-service and metaflow_ui image tags to official arm64 supported releases
  • add cleanup of AWS_PROFILE env var that interferes with the local minio profiles set up by metaflow-dev shell

# We read the actual location from package metadata in this case, but only do this heavier operation if the above lookups fail.
try:
import json
from importlib.metadata import Distribution
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for py < 3.10, you would want to do - from metaflow._vendor.importlib_metadata ..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the vendored importlib won't actually solve the issue for older python versions, as editable installs with python <=3.8 do not install dist files, instead producing an .egg-link which is not supported by the importlib metadata.

the difference in install files is most likely due to the setuptools versions that the different python version picks. I can either introduce separate logic for <=3.8 that reads the editable path from the egg-link file, or we leave older versions affected. 3.9 onward works as expected with the default importlib so no need to use vendored one for these

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least a check that fails nicely would be great

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a detailed error for the editable lookup failure.

while testing this, some of my virtualenvs were installing metaflow with an egg-link, while others were generating the correct dist metadata for lookup. Tried versions 3.8->3.12
The culprit here seems to be the version of pip. 23.0.1 which is the default for many venvs, installs via egg-link, while pip install pip --upgrade bumps this to 25.0.1 which installs dist metadata on all of the tested python versions.

Copy link
Collaborator

@savingoyal savingoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one open comment otherwise lgtm!

@saikonen saikonen changed the title fix: metaflow-dev with editable install fix: metaflow-dev improvements Aug 7, 2025
@savingoyal savingoyal enabled auto-merge (squash) August 9, 2025 04:05
@savingoyal savingoyal merged commit 33ffdf8 into master Aug 9, 2025
29 checks passed
@savingoyal savingoyal deleted the fix/metaflow-dev-with-editable branch August 9, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants