Skip to content
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

Disable code that depends on conda-docker #667

Merged
merged 6 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading