Skip to content

Commit

Permalink
fix dockerize tag tuple typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tianweidut committed Sep 20, 2022
1 parent b7a536c commit 2c33eed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions client/starwhale/core/runtime/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ def _lock(
)
def _dockerize(
uri: str,
tag: t.List[str],
tag: t.Tuple[str],
push: bool,
platform: t.List[str],
platform: t.Tuple[str],
dry_run: bool,
use_starwhale_builder: bool,
reset_qemu_static: bool,
Expand All @@ -383,5 +383,10 @@ def _dockerize(
URI (str): Starwhale Runtime URI in the standalone instance
"""
RuntimeTermView(uri).dockerize(
tag, push, platform, dry_run, use_starwhale_builder, reset_qemu_static
list(tag),
push,
list(platform),
dry_run,
use_starwhale_builder,
reset_qemu_static,
)
2 changes: 1 addition & 1 deletion client/starwhale/core/runtime/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ def _render_dockerignore() -> None:
)

def _build(_manifest: t.Dict[str, t.Any]) -> None:
_tags = tags or []
_tags = list(tags or [])
_platforms = platforms or []
_dc_image = _manifest["configs"].get("docker", {}).get("image")
if _dc_image:
Expand Down
2 changes: 1 addition & 1 deletion client/tests/core/test_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def test_dockerize(self, m_check: MagicMock) -> None:
assert f"--file {dockerfile_path}" in build_cmd

RuntimeTermView(f"{name}/version/{version}").dockerize(
tags=[],
tags=("t1", "t2", "t3"), # type: ignore
push=False,
platforms=[SupportArch.ARM64],
dry_run=False,
Expand Down

0 comments on commit 2c33eed

Please sign in to comment.