• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeovn / kube-ovn / 24131055659
24%

Build:
DEFAULT BRANCH: master
Ran 08 Apr 2026 10:39AM UTC
Jobs 1
Files 205
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Apr 2026 10:37AM UTC coverage: 24.34% (+0.01%) from 24.326%
24131055659

push

github

web-flow
fix: add SplitTrimmed to prevent index out of range and empty token propagation (#6592)

* fix: add SplitTrimmed to prevent index out of range and empty token propagation

Add util.SplitTrimmed() that splits strings, trims whitespace, and
filters empty tokens. Replace bare strings.Split/SplitSeq calls across
14 sites in daemon and controller packages to defend against malformed
comma-separated IP/gateway annotations containing trailing commas,
leading commas, or extra whitespace.

The primary fix is in waitNetworkReady() where two Split results were
iterated in parallel without length validation, risking index out of
range panic when gateway elements outnumber IP elements. Also normalize
BFDPort status IP to prevent downstream SplitStringIP/CheckProtocol
failures when spec contains whitespace.

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* fix: add empty slice guards after SplitTrimmed for egress gateway parsing

SplitTrimmed returns nil for empty/whitespace-only input, unlike
strings.Split which returns [""] (length 1). Add len(egw) == 0 guards
at three call sites that directly index egw[0] to prevent index out of
range panic on malformed ExternalEgressGateway values.

Addresses Copilot review feedback on PR #6592.

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

---------

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

15 of 34 new or added lines in 5 files covered. (44.12%)

13663 of 56134 relevant lines covered (24.34%)

0.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
0.0
0.0% pkg/daemon/gateway_linux.go
4
0.33
0.33% pkg/daemon/ovs_linux.go
3
20.69
0.0% pkg/controller/vpc.go
2
8.49
-0.14% pkg/daemon/controller_linux.go
Jobs
ID Job ID Ran Files Coverage
1 24131055659.1 08 Apr 2026 10:39AM UTC 205
24.34
GitHub Action Run
Source Files on build 24131055659
  • Tree
  • List 205
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6cf33fa5 on github
  • Prev Build on master (#24121440546)
  • Next Build on master (#24136831135)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc