Skip to content

Release v0.3.119

Choose a tag to compare

@github-actions github-actions released this 19 May 15:42
bf71679

Summary

  • Timeout: Increase default HTTP client timeout from 5s to 30s. Both node-agent and synchronizer had the same 5s limit, causing a race where the synchronizer's ReadTimeout could close the connection before responding, producing spurious context deadline exceeded (Client.Timeout exceeded while awaiting headers) errors — no high CPU required to trigger this.
  • Mutex stall: eventsStorageMutex was held for the entire HTTP round-trip (up to 5s on timeout), blocking all ReportEvent/handleNetworkEvent/handleDnsEvent goroutines. Fixed by snapshotting under the lock and releasing before the HTTP call. A new Entities map with entity structs copied by value is sufficient — the clearing loop never mutates Inbound/Outbound maps in place, so the old maps become exclusively owned by the snapshot once the lock is released.
  • Empty-stream skip: sendNetworkEvent logged "skipping" for empty streams but still sent the HTTP request. Added the missing return nil.

Deploy note: the timeout fix requires the matching change in kubescape/synchronizer (raise ReadTimeout to 30s) to be deployed together.

Test plan

  • Verify no context deadline exceeded errors in node-agent logs after deploying both PRs together
  • Confirm empty network stream intervals no longer generate HTTP requests to the synchronizer
  • Confirm network/DNS event recording is not stalled during a synchronizer outage

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • HTTP request timeout increased from 5 to 30 seconds for improved stability.
  • Performance

    • Network event processing now skips unnecessary operations when no events are present.
    • Improved concurrency handling in network event storage and transmission.

Review Change Stack