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

openconfig / ygnmi / 40357820016
4%

Build:
DEFAULT BRANCH: main
Ran 26 Oct 2026 04:19PM UTC
Jobs 1
Files 63
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

26 Oct 2026 04:18PM UTC coverage: 4.496% (+0.02%) from 4.477%
40357820016

push

github

web-flow
Buffer Reconciler.errCh to prevent deadlock on subscribe error (#198)

**TLDR**: Buffer `Reconciler.errCh` with a size of 1 so `Reconciler.Start` does
not deadlock when `subscribe` returns an error.

### Problem Statement

`NewReconciler` previously initialised `errCh` as an unbuffered channel.
`Reconciler.Start` calls `subscribe` synchronously on the caller goroutine. When
`subscribe` fails, `Start` sends the error to `r.errCh` before `Start` returns.
Because the caller cannot call `Reconciler.Await` until `Start` returns, that
channel write blocked forever.

### Proposed Solution

Initialise `Reconciler.errCh` with a buffer size of 1, which matches `Watch` and
`WatchAll`. This buffer lets `Reconciler.Start` record one synchronous subscribe
error and return immediately so the caller can read the error from
`Reconciler.Await`.

### Implementation Details

- **`ygnmi/ygnmi.go`**: Initialise `errCh` with `make(chan error, 1)` in
  `NewReconciler` and document the error path in `Reconciler.Start`.
- **`internal/gnmitestutil/gnmi.go`**: Add `(*Stubber).SubscribeError` so unit
  tests can stub synchronous `Subscribe` RPC errors on `FakeGNMI`.
- **`ygnmi/ygnmi_test.go`**: Add `TestReconcileSubscribeError` to test
  `Subscribe` RPC errors, `WithUseGet`, and non-leaf `WithFT` queries with a
  1-second deadlock timeout.
- **`ygnmi/ygnmi_preferconfig_test.go`**: Regenerate the prefer-config test file
  with `go generate ./ygnmi/...`.

4 of 12 new or added lines in 2 files covered. (33.33%)

1 existing line in 1 file now uncovered.

2035 of 45260 relevant lines covered (4.5%)

0.05 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
0.0
0.0% internal/gnmitestutil/gnmi.go

Coverage Regressions

Lines Coverage ∆ File
1
0.0
0.0% internal/gnmitestutil/gnmi.go
Jobs
ID Job ID Ran Files Coverage
1 40357820016.1 26 Oct 2026 04:19PM UTC 63
4.5
GitHub Action Run
Source Files on build 40357820016
  • Tree
  • List 63
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1b68db65 on github
  • Prev Build on main (#40356999370)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc