Skip to content

Commit

Permalink
Merge pull request #667 from nkaretnikov/skip-conda-docker-test
Browse files Browse the repository at this point in the history
Disable code that depends on conda-docker
  • Loading branch information
Nikita Karetnikov authored Nov 22, 2023
2 parents a5680f8 + a566e7d commit 53d224e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pathlib
import sys

from conda_store_server import action

Expand All @@ -13,10 +12,10 @@ def action_generate_conda_docker(
output_image_name: str,
output_image_tag: str,
):
if sys.platform != "linux":
raise RuntimeError(
"Generating Docker images is currently only supported on Linux"
)
raise RuntimeError(
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"
)

# Import is inside the function because conda_docker is only available on
# Linux
Expand Down
8 changes: 8 additions & 0 deletions conda-store-server/conda_store_server/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ def build_conda_pack(db: Session, conda_store, build: orm.Build):


def build_conda_docker(db: Session, conda_store, build: orm.Build):
import warnings

warnings.warn(
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"
)
return

conda_prefix = build.build_path(conda_store)
settings = conda_store.get_settings(
db=db,
Expand Down
4 changes: 3 additions & 1 deletion conda-store-server/tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ def test_generate_conda_pack(tmp_path, conda_prefix):
assert output_filename.exists()


@pytest.mark.skipif(sys.platform != "linux", reason="conda-docker only works on linux")
@pytest.mark.xfail(reason=(
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"))
def test_generate_conda_docker(conda_store, conda_prefix):
action.action_generate_conda_docker(
conda_prefix=conda_prefix,
Expand Down

0 comments on commit 53d224e

Please sign in to comment.