Skip to content

Commit

Permalink
More fixes to local datastore use
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-intel committed Aug 8, 2024
1 parent dcf7b2e commit 340f80c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
env:
METAFLOW_CONDA_DEPENDENCY_RESOLVER: ${{ matrix.resolver }}
METAFLOW_CONDA_TEST: 1
METAFLOW_DATASTORE_SYSROOT_LOCAL: .metaflow
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand All @@ -43,4 +44,5 @@ jobs:
run: |
set -x
which pytest
mkdir .metaflow
pytest -n 16 tests
2 changes: 1 addition & 1 deletion metaflow_extensions/netflix_ext/plugins/conda/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _modified_logger(*args: Any, **kwargs: Any):
# Prevent circular dep
from metaflow.plugins import DATASTORES

# We will be able to cache things -- currently no caching for local
# We will be able to cache things -- currently no caching for local except in testing
storage_impl = [d for d in DATASTORES if d.TYPE == self._datastore_type][0]
self._storage = storage_impl(
get_conda_root(self._datastore_type)
Expand Down
5 changes: 0 additions & 5 deletions tests/test_env_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
except FileExistsError:
pass

# Create a local `.metaflow` directory for the local storage. If this is not
# done, there are cases where there is a race in creating it causing tests to fail.
if not os.path.isdir(os.path.join(my_dir, ".metaflow")):
os.mkdir(os.path.join(my_dir, ".metaflow"))

with os.scandir(os.path.join(my_dir, "environments")) as it:
for entry in it:
if entry.is_file() and (
Expand Down

0 comments on commit 340f80c

Please sign in to comment.