feat: 2.1.0 incidents, filter bar and IP analysis redesign; probe egress files fix
CI / Format and vet (pull_request) Successful in 1m1s
CI / Dependency audit (pull_request) Successful in 32s
CI / Tests (Linux, race detector) (pull_request) Successful in 1m55s
Release / Plan (reuse the published image?) (push) Successful in 4s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (hub) (push) Skipped
Release / Publish tags (probe) (push) Skipped
Release / Gitea release (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-15 23:18:38 -03:00
1 parent 7c92d4b359
commit 00c4ab6d4a
15 files changed
+1063 -238

No files matched your search

+31 -12
View File
@@ -63,6 +63,11 @@ type Node struct {
egrSrc atomic.Pointer[egress.Source]
egrActive atomic.Bool
sources atomic.Pointer[[]string]
// Last containers.map / resolv.conf the probe sent. The probe resends them
// only when they change, so they are kept here and applied to every engine
// this node builds (a configuration change rebuilds the engine).
containers atomic.Pointer[[]byte]
resolv atomic.Pointer[[]byte]
}
func (sh *shared) newNode(name string, primary bool, rec hub.Probe) (*Node, error) {
@@ -189,6 +194,12 @@ func (n *Node) buildEgress(eg hub.Egress) error {
if err != nil {
return err
}
if b := n.containers.Load(); b != nil {
eng.SetContainers(*b)
}
if b := n.resolv.Load(); b != nil {
eng.SetResolv(*b)
}
n.egr.Store(eng)
n.egrSrc.Store(egress.NewRemoteSource(eng, n.sh.log))
n.egrSrc.Load().SetState("waiting")
@@ -240,6 +251,26 @@ func (n *Node) Ready() bool { return true }
func (n *Node) Offsets() map[string]wire.Pos { return n.Run.RemoteOffsets() }
func (n *Node) Apply(b wire.Batch) (int, int) {
// Files first: egress lines of this very batch must be judged with the
// resolvers and container names that came with them.
for _, f := range b.Files {
data := []byte(f.Data)
switch f.Name {
case wire.FileContainers:
n.containers.Store(&data)
case wire.FileResolv:
n.resolv.Store(&data)
default:
continue
}
if e := n.egr.Load(); e != nil {
if f.Name == wire.FileContainers {
e.SetContainers(data)
} else {
e.SetResolv(data)
}
}
}
acc, dup := n.Run.ApplyBatch(b.Lines)
if acc > 0 {
for _, l := range b.Lines {
@@ -249,18 +280,6 @@ func (n *Node) Apply(b wire.Batch) (int, int) {
}
}
}
for _, f := range b.Files {
e := n.egr.Load()
if e == nil {
continue
}
switch f.Name {
case wire.FileContainers:
e.SetContainers([]byte(f.Data))
case wire.FileResolv:
e.SetResolv([]byte(f.Data))
}
}
return acc, dup
}