Skip to content

[Python SDK] use_pod_ip flag is ignored — Sandbox/AsyncSandbox always pass get_pod_ip, defeating DNS-by-default #1029

Description

@grosser

Description

SandboxInClusterConnectionConfig.use_pod_ip (default False) is documented as: "By default, connects via stable K8s DNS … When use_pod_ip=True, connects directly to the pod IP." (models.py).

As of 636e032 (#800), both Sandbox and AsyncSandbox unconditionally pass get_pod_ip to SandboxConnector:

# sandbox.py:65 / async_sandbox.py:68
get_pod_ip=self.get_pod_ip,   # was: self.get_pod_ip if use_pod_ip else None

InClusterConnectionStrategy.connect() then always attempts pod-IP routing first and silently falls back to cluster DNS. Net effect: the use_pod_ip flag is dead — setting it to False (the documented default) does not force DNS routing.

Impact

Suggested fix

Restore the gating — get_pod_ip=self.get_pod_ip if use_pod_ip else None in both Sandbox and AsyncSandbox — or make connect() honor config.use_pod_ip directly.

Note

Introduced in #800; present at HEAD. Released 0.4.5 still has the correct gating, so consumers pinned to 0.4.5 are unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Linked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions