Merge origin/main into debug-bundle-anonymize-level-upload-url

Sync the base branch onto main (was ~50 commits behind). The only conflict
was the generated shared/management/proto/management.pb.go; the .proto merged
cleanly, so management.pb.go was regenerated from it with the pinned toolchain
(protoc v3.21.12, protoc-gen-go v1.26.0) — management_grpc.pb.go left untouched
to keep its version header. Management, shared, and client trees build clean.
This commit is contained in:
mlsmaycon
2026-08-27 08:15:12 +00:00
378 changed files with 22477 additions and 5123 deletions
@@ -112,8 +112,6 @@ func (a *Account) GetPeerNetworkMapComponents(
return EmptyNetworkMapComponents(&NetworkMapComponents{
PeerID: peerID,
Network: a.Network.Copy(),
// must include the target peer as it's required on the client
Peers: map[string]*ComponentPeer{peerID: peer.ToComponent()},
})
}
@@ -0,0 +1,20 @@
package types
import (
"context"
"testing"
"github.com/netbirdio/netbird/dns"
"github.com/netbirdio/netbird/shared/management/types"
"github.com/stretchr/testify/assert"
)
func TestGetPeerNetworkMapComponents_PeerMissingFromAcount(t *testing.T) {
account := Account{Network: NewNetwork()}
nmapcomponets := account.GetPeerNetworkMapComponents(context.TODO(), "missing-peer", dns.CustomZone{}, nil, nil, nil, nil, nil)
assert.Equal(t, EmptyNetworkMapComponents(&types.NetworkMapComponents{
PeerID: "missing-peer",
Network: account.Network,
}), nmapcomponets)
}