Flaky test cache filter

Open
#4,075 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@AshrafAhmed9 is already working on this.

Since Jul 1, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
go

Research direction

Start with filters/cache/filter_test.go at line 386 and filters/cache/filter.go at line 337, then run the cache package tests to reproduce the panic. Check the cold-miss coalescing test and its fetch-stub setup; done means the test no longer flakes or panics and the package test passes reliably.

Written by the indexing model from the issue text.

Description

flakytest
time="2026-06-17T18:07:08Z" level=warning msg="cache: background revalidation fetch failed" error="no fetch stub set" url="http://localhost:9090/spaces/abc/entries/swr"
panic: close of closed channel
	
	runtime/debug.Stack()
		/opt/hostedtoolcache/go/1.26.4/x64/src/runtime/debug/stack.go:26 +0x68
	golang.org/x/sync/singleflight.newPanicError({0x1018640, 0x11676d0})
		/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:44 +0x2b
	golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
		/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:193 +0x51
	panic({0x1018640?, 0x11676d0?})
		/opt/hostedtoolcache/go/1.26.4/x64/src/runtime/panic.go:860 +0x13a
	github.com/zalando/skipper/filters/cache.TestCacheFilter_ColdMissCoalescing.func1(0x0?)
		/home/runner/work/skipper/skipper/filters/cache/filter_test.go:386 +0x6f
	github.com/zalando/skipper/filters/cache.(*cacheFilter).coalesce.func1()
		/home/runner/work/skipper/skipper/filters/cache/filter.go:337 +0xba
	golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc0000a6f07, 0xc00003a0a0, 0xc0004b1ce0)
		/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:198 +0xaa
	golang.org/x/sync/singleflight.(*Group).doCall(0xc000136560, 0xc00003a0a0, {0xc00015efc0, 0x40}, 0xc0004b1ce0)
		/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:200 +0x132
	created by golang.org/x/sync/singleflight.(*Group).DoChan in goroutine 136
		/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:138 +0x55d
	

goroutine 169 [running]:
golang.org/x/sync/singleflight.(*Group).doCall.func1.gowrap2()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:167 +0x39
created by golang.org/x/sync/singleflight.(*Group).doCall.func1 in goroutine 168
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:167 +0x4b3
FAIL	github.com/zalando/skipper/filters/cache	0.082s
Dominant language
Go
Stars
3.3k
Forks
410
Avg merge
3d 16h
Merged PRs (30d)
32

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zalando/skipper

All issues in zalando/skipper

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.