Skip to content

Commit

Permalink
handle race condition with local packages meta (Netflix#1688)
Browse files Browse the repository at this point in the history
* support git repos

* remove spurious function

* fix formatting

* handle race condition with local packages metadata

* remove print
  • Loading branch information
savingoyal authored and madhur-ob committed Jan 18, 2024
1 parent 710eb5a commit 21fb049
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion metaflow/plugins/pypi/conda_environment.py
@@ -1,3 +1,4 @@
import copy
import errno
import fcntl
import functools
Expand Down Expand Up @@ -130,13 +131,15 @@ def _path(url, local_path):
}
dirty = set()
# Prune list of packages to cache.

_meta = copy.deepcopy(local_packages)
for id_, packages, _, _ in results:
for package in packages:
if package.get("path"):
# Cache only those packages that manifest is unaware of
local_packages.pop(package["url"], None)
else:
package["path"] = local_packages[package["url"]]["path"]
package["path"] = _meta[package["url"]]["path"]
dirty.add(id_)

list_of_path_and_filehandle = [
Expand Down

0 comments on commit 21fb049

Please sign in to comment.