Skip to content

Commit 4727c3d

Browse files
THardy98tconley1428
authored andcommitted
remove address check (#1030)
1 parent 8cc20c9 commit 4727c3d

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

temporalio/envconfig.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,10 @@ def to_dict(self) -> ClientConfigProfileDict:
230230

231231
def to_client_connect_config(self) -> ClientConnectConfig:
232232
"""Create a `ClientConnectConfig` from this profile."""
233-
if not self.address:
234-
raise ValueError(
235-
"Configuration profile must contain an 'address' to be used for "
236-
"client connection"
237-
)
238-
239233
# Only include non-None values
240234
config: Dict[str, Any] = {}
241-
config["target_host"] = self.address
235+
if self.address:
236+
config["target_host"] = self.address
242237
if self.namespace is not None:
243238
config["namespace"] = self.namespace
244239
if self.api_key is not None:

tests/test_envconfig.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,13 +505,6 @@ async def test_load_client_connect_config(client: Client, tmp_path: Path):
505505
assert new_client.namespace == "env-only-namespace"
506506

507507

508-
def test_to_client_connect_config_missing_address_fails():
509-
"""Test that to_client_connect_config raises a ValueError if address is missing."""
510-
profile = ClientConfigProfile()
511-
with pytest.raises(ValueError, match="must contain an 'address'"):
512-
profile.to_client_connect_config()
513-
514-
515508
def test_disables_raise_error():
516509
"""Test that providing both disable_file and disable_env raises an error."""
517510
with pytest.raises(RuntimeError, match="Cannot disable both"):

0 commit comments

Comments
 (0)