Skip to content

Bump to 0.1.18#112

Merged
JimyMa merged 11 commits into
mainfrom
bump_to_0.1.18
Jun 4, 2026
Merged

Bump to 0.1.18#112
JimyMa merged 11 commits into
mainfrom
bump_to_0.1.18

Conversation

@JimyMa
Copy link
Copy Markdown
Contributor

@JimyMa JimyMa commented Jun 4, 2026

No description provided.

JimyMa and others added 11 commits June 4, 2026 21:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@JimyMa JimyMa deployed to self-hosted-rdma June 4, 2026 14:36 — with GitHub Actions Active
@JimyMa JimyMa merged commit 11c62b7 into main Jun 4, 2026
11 of 12 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces dynamic local TCP host resolution for the PeerAgent to prevent remote peers from receiving unroutable 0.0.0.0 addresses, and adds connection reuse for TCP. It also improves connection failure handling during handshakes, adds a new two-process TCP read example, and bumps the project version to 0.1.18. Feedback was provided to remove a duplicate @staticmethod decorator and optimize _local_ip_for_remote by passing the resolved address tuple directly to sock.connect to avoid redundant DNS lookups.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

dlslime/dlslime/peer_agent/_agent.py (428-441)

medium

There is a duplicate @staticmethod decorator on _local_ip_for_remote. Additionally, when calling sock.connect, we can pass the already resolved address tuple gai[0][4] directly instead of re-resolving remote_host inside connect(). This avoids redundant DNS lookups and is more robust.

    @staticmethod
    def _local_ip_for_remote(remote_host: str) -> str:
        if not remote_host:
            return ""
        try:
            # Resolve the family dynamically to support both IPv4 and IPv6
            gai = socket.getaddrinfo(remote_host, 80, type=socket.SOCK_DGRAM)
            if not gai:
                return ""
            family = gai[0][0]
            with socket.socket(family, socket.SOCK_DGRAM) as sock:
                sock.connect(gai[0][4])
                return sock.getsockname()[0]
        except OSError:
            return ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant