Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Expand Up @@ -22,8 +22,7 @@
)
from nemo_platform._base_client import AsyncAPIClient, SyncAPIClient
from nemo_platform_plugin.client.constants import WORKLOAD_IDENTITY_TOKEN_FILE_ENVVAR

from nemo_platform_ext.client.tls import client_verify_from_env
from nemo_platform_plugin.client.tls import client_verify_from_env


def _should_bootstrap_config(
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/nemo-platform/src/nemo_platform/_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ class ResourceReplacement(BaseModel):
_CLIENT_HELPER_FUNCTION_NAMES = ("_should_bootstrap_config", "_copy_requires_bootstrap")
_CLIENT_INIT_REQUIRED_IMPORTS: dict[str, tuple[str, ...]] = {
"nemo_platform._base_client": ("DefaultAsyncHttpxClient", "DefaultHttpxClient"),
"nemo_platform_ext.client.tls": ("client_verify_from_env",),
"nemo_platform_plugin.client.constants": ("WORKLOAD_IDENTITY_TOKEN_FILE_ENVVAR",),
"nemo_platform_plugin.client.tls": ("client_verify_from_env",),
"pathlib": ("Path",),
}
_STALE_CLIENT_INIT_IMPORTS: dict[str, tuple[str, ...]] = {
"nemo_platform.client.tls": ("client_verify_from_env",),
"nemo_platform_ext.client.tls": ("client_verify_from_env",),
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ def test_replace_client_methods_updates_init_and_getattr(tmp_path: Path) -> None
client_path.write_text(
"""
from typing import Any
from nemo_platform_ext.client.tls import client_verify_from_env
def _should_bootstrap_config(config_path: object | None = None) -> bool:
Expand Down Expand Up @@ -1096,8 +1097,9 @@ def __getattr__(self, name: str) -> Any:

assert "from pathlib import Path" in updated
assert "from nemo_platform._base_client import DefaultAsyncHttpxClient, DefaultHttpxClient" in updated
assert "from nemo_platform_ext.client.tls import client_verify_from_env" in updated
assert "from nemo_platform_plugin.client.constants import WORKLOAD_IDENTITY_TOKEN_FILE_ENVVAR" in updated
assert "from nemo_platform_plugin.client.tls import client_verify_from_env" in updated
assert "from nemo_platform_ext.client.tls import client_verify_from_env" not in updated
Comment thread
mckornfield marked this conversation as resolved.
assert "def _should_bootstrap_config(config_path: Path | None = None) -> bool:" in updated
assert "return config_path is not None" in updated
assert "return False" not in updated
Expand Down
Loading