Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit 7896edb

Browse files
committed
Make useAlternativeEndpoints configurable
1 parent b5c7b79 commit 7896edb

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

packages/jumpstarter/jumpstarter/client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async def client_from_channel(
2626
stack: ExitStack,
2727
allow: list[str],
2828
unsafe: bool,
29-
use_alternative_endpoints: bool = True,
29+
use_alternative_endpoints: bool = False,
3030
) -> DriverClient:
3131
topo = defaultdict(list)
3232
last_seen = {}

packages/jumpstarter/jumpstarter/client/lease.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class Lease(AbstractContextManager, AbstractAsyncContextManager):
4141
controller: jumpstarter_pb2_grpc.ControllerServiceStub = field(init=False)
4242
tls_config: TLSConfigV1Alpha1 = field(default_factory=TLSConfigV1Alpha1)
4343
grpc_options: dict[str, Any] = field(default_factory=dict)
44+
use_alternative_endpoints: bool = False
4445

4546
def __post_init__(self):
4647
if hasattr(super(), "__post_init__"):
@@ -184,7 +185,14 @@ async def _monitor():
184185
@asynccontextmanager
185186
async def connect_async(self, stack):
186187
async with self.serve_unix_async() as path:
187-
async with client_from_path(path, self.portal, stack, allow=self.allow, unsafe=self.unsafe) as client:
188+
async with client_from_path(
189+
path,
190+
self.portal,
191+
stack,
192+
allow=self.allow,
193+
unsafe=self.unsafe,
194+
use_alternative_endpoints=self.use_alternative_endpoints,
195+
) as client:
188196
yield client
189197

190198
@contextmanager

packages/jumpstarter/jumpstarter/config/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class ClientConfigV1Alpha1(BaseModel):
5050
token: str
5151
grpcOptions: dict[str, str | int] | None = Field(default_factory=dict)
5252

53+
useAlternativeEndpoints: bool = False
54+
5355
drivers: ClientConfigV1Alpha1Drivers
5456

5557
async def channel(self):
@@ -172,6 +174,7 @@ async def lease_async(
172174
release=release_lease,
173175
tls_config=self.tls,
174176
grpc_options=self.grpcOptions,
177+
use_alternative_endpoints=self.useAlternativeEndpoints,
175178
) as lease:
176179
yield lease
177180

0 commit comments

Comments
 (0)