Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Netflix/metaflow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.11.7
Choose a base ref
...
head repository: Netflix/metaflow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.11.8
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Mar 29, 2024

  1. rewrite vcs pip url with subpath if present. (#1783)

    saikonen authored Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1eb7718 View commit details
  2. bump version to 2.11.8 (#1784)

    saikonen authored Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    47c205c View commit details
  3. inject keyrings.google-artifactregistry-auth for GCP PyPI (#1782)

    * inject keyrings.google-artifactregistry-auth for GCP PyPI
    
    * add comment
    madhur-ob authored Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e577781 View commit details
Showing with 27 additions and 3 deletions.
  1. +9 −0 metaflow/plugins/pypi/conda_environment.py
  2. +17 −2 metaflow/plugins/pypi/pip.py
  3. +1 −1 metaflow/version.py
9 changes: 9 additions & 0 deletions metaflow/plugins/pypi/conda_environment.py
Original file line number Diff line number Diff line change
@@ -282,6 +282,15 @@ def get_environment(self, step):
# Match PyPI and Conda python versions with the resolved environment Python.
environment["pypi"]["python"] = environment["conda"]["python"] = env_python

# When using `Application Default Credentials` for private GCP
# PyPI registries, the usage of environment variable `GOOGLE_APPLICATION_CREDENTIALS`
# demands that `keyrings.google-artifactregistry-auth` has to be installed
# and available in the underlying python environment.
if os.getenv("GOOGLE_APPLICATION_CREDENTIALS"):
environment["conda"]["packages"][
"keyrings.google-artifactregistry-auth"
] = ">=1.1.1"

# Z combinator for a recursive lambda
deep_sort = (lambda f: f(f))(
lambda f: lambda obj: (
19 changes: 17 additions & 2 deletions metaflow/plugins/pypi/pip.py
Original file line number Diff line number Diff line change
@@ -92,7 +92,14 @@ def _format(dl_info):
# so using @branch as a version acts as expected.
vcs_info = dl_info.get("vcs_info")
if vcs_info:
res["url"] = "{vcs}+{url}@{commit_id}".format(**vcs_info, **res)
subdirectory = dl_info.get("subdirectory")
res["url"] = "{vcs}+{url}@{commit_id}{subdir_str}".format(
**vcs_info,
**res,
subdir_str="#subdirectory=%s" % subdirectory
if subdirectory
else ""
)
# used to deduplicate the storage location in case wheel does not
# build with enough unique identifiers.
res["hash"] = vcs_info["commit_id"]
@@ -270,9 +277,17 @@ def _call(self, prefix, args, env=None, isolated=True):
prefix,
"pip3",
"--disable-pip-version-check",
"--no-input",
"--no-color",
]
# credentials are being determined from the JSON file referenced by
# the GOOGLE_APPLICATION_CREDENTIALS environment variable and are
# probably injected dynamically via `keyrings.google-artifactregistry-auth`
# Thus, we avoid passing `--no-input` in this case.
+ (
["--no-input"]
if os.getenv("GOOGLE_APPLICATION_CREDENTIALS") is None
else []
)
+ (["--isolated"] if isolated else [])
+ args,
stderr=subprocess.PIPE,
2 changes: 1 addition & 1 deletion metaflow/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
metaflow_version = "2.11.7"
metaflow_version = "2.11.8"