Azure / Azure/unbounded

Gantry: 2 - Self-provider filter namespace fix

Open
#278 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
28
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
55

Description

## Scope

Fix the self-provider filter namespace mismatch.

## Problem

DHT providers use libp2p peer IDs, while the current self filter uses the Kubernetes node name. DHT-sourced self records are never filtered, so a node can dial its own transfer endpoint and waste peer attempts.

Evidence:

- `cmd/gantry/main.go:576`
- `internal/gantry/mirror/mirror.go:1584`
- `internal/gantry/members/members.go:161`
- `internal/gantry/discovery/discovery.go:384`

## Changes

- Keep the existing self node-name filter for membership and cold-start providers.
- Add a separate self peer-ID filter, wired from `disco.PeerID().String()`.
- In `filterProvidersForDigest`, skip a provider if its `NodeID` matches either the self node name or the self peer ID.

## Tests

- DHT-sourced self provider with peer ID is filtered.
- Membership-sourced self provider with Kubernetes node name is still filtered.
- Non-self providers in either namespace are preserved.

Contributor guide

Open the contributing guide

Research direction

Start with `internal/gantry/mirror/mirror.go:1584` and trace how `filterProvidersForDigest` handles provider `NodeID`s; use the wiring and existing filters in `cmd/gantry/main.go:576`, `internal/gantry/members/members.go:161`, and `internal/gantry/discovery/discovery.go:384` for context. Done when tests confirm self providers in both the peer-ID and node-name namespaces are filtered, while non-self providers in either namespace are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.