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

optimizely / agent / 18291298483
86%
master: 87%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v4.4.0
DEFAULT BRANCH: master
Ran 06 Oct 2025 06:56PM UTC
Jobs 1
Files 51
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

06 Oct 2025 06:53PM UTC coverage: 86.309% (+0.1%) from 86.177%
18291298483

Pull #444

github

Mat001
Complete fix for goroutine lifecycle race condition in Subscribe

Address comprehensive goroutine lifecycle management issue:

Problem:
The previous fix with buffered channel only prevented blocking, but didn't
prevent goroutine leaks. When the main function returns with an error or
due to context cancellation BEFORE the goroutine enters its main loop, the
goroutine would continue running indefinitely until the original context
expires (could be much later).

Complete Solution:
1. Added stop channel (chan struct{}) to signal goroutine termination
2. Goroutine checks stop channel during initialization (both error and success paths)
3. Goroutine checks stop channel as first case in main select loop
4. Main function closes stop channel when returning with error or ctx.Done()
5. Main function does NOT close stop on success - goroutine continues normally

This ensures:
- No goroutine leaks when Subscribe returns early with error
- No goroutine leaks when context is cancelled during initialization
- Clean resource cleanup via defer statements
- Goroutine runs normally when initialization succeeds

Verified with race detector running 3 consecutive times.
Pull Request #444: [FSSDK-] Add redis-streams

440 of 521 new or added lines in 6 files covered. (84.45%)

3 existing lines in 1 file now uncovered.

3316 of 3842 relevant lines covered (86.31%)

2491.66 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
69.74
7.24% plugins/odpcache/services/redis_cache.go
2
80.52
3.33% plugins/userprofileservice/services/redis_ups.go
77
80.15
pkg/syncer/pubsub/redis_streams.go

Uncovered Existing Lines

Lines Coverage ∆ File
3
85.42
0.0% pkg/optimizely/cache.go
Jobs
ID Job ID Ran Files Coverage
1 18291298483.1 06 Oct 2025 06:56PM UTC 51
86.31
GitHub Action Run
Source Files on build 18291298483
  • Tree
  • List 51
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #444
  • PR Base - master (#17843218393)
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

© 2025 Coveralls, Inc