Skip to content

Commit c59cf87

Browse files
authored
[Hotfix] Fix unit test and related issue (#167)
1 parent 4118ee5 commit c59cf87

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentscope-runtime"
3-
version = "0.2.0b1"
3+
version = "0.2.0b2"
44
description = "A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support."
55
readme = "README.md"
66
requires-python = ">=3.10"

src/agentscope_runtime/common/container_clients/kubernetes_client.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# -*- coding: utf-8 -*-
2-
# pylint: disable=too-many-branches, self-assigning-variable
3-
# pylint: disable=too-many-statements
4-
5-
import hashlib
6-
import logging
2+
# pylint: disable=too-many-branches,too-many-statements
73
import time
4+
import hashlib
85
import traceback
6+
import logging
7+
98
from typing import Optional, Tuple
109

1110
from kubernetes import client
@@ -16,14 +15,12 @@
1615

1716
logger = logging.getLogger(__name__)
1817

19-
DEFAULT_IMAGE_REGISTRY = "agentscope-registry.ap-southeast-1.cr.aliyuncs.com"
20-
2118

2219
class KubernetesClient(BaseClient):
2320
def __init__(
2421
self,
2522
config=None,
26-
image_registry: Optional[str] = DEFAULT_IMAGE_REGISTRY,
23+
image_registry: Optional[str] = None,
2724
):
2825
self.config = config
2926
namespace = self.config.k8s_namespace
@@ -157,11 +154,7 @@ def _create_pod_spec(
157154
container_name = name or "main-container"
158155

159156
# Container specification
160-
# TODO: use image from docker registry first
161-
162-
if not self.image_registry:
163-
image = image
164-
else:
157+
if self.image_registry:
165158
image = f"{self.image_registry}/{image}"
166159

167160
container = client.V1Container(

0 commit comments

Comments
 (0)