Skip to content

Pkotest #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Pkotest #179

wants to merge 4 commits into from

Conversation

eqrx
Copy link
Member

@eqrx eqrx commented May 8, 2025

No description provided.

erdii and others added 4 commits April 28, 2025 15:45
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>
…ache accessor requests

This fixes a bug where gcCache tries to close a nil channel in the cacheWaitInFlight map.

```
2025-04-28T13:02:17Z	INFO	ObjectBoundAccessManager.TrackingCache	stopping informers	{"gvks": [{"Group":"[apiextensions.k8s.io](http://apiextensions.k8s.io)","Version":"v1","Kind":"CustomResourceDefinition"}]}
panic: close of nil channel

goroutine 455 [running]:
pkg.package-operator.run/boxcutter/managedcache.(*trackingCache).RemoveOtherInformers.func1({0x27ff2f0, 0xc001103da0})
	pkg.package-operator.run/boxcutter@v0.1.0/managedcache/trackingcache.go:391 +0x4d9
pkg.package-operator.run/boxcutter/managedcache.(*trackingCache).Start(0xc00084ab40, {0x27ff328, 0xc00086cb90})
	pkg.package-operator.run/boxcutter@v0.1.0/managedcache/trackingcache.go:142 +0x2dd
pkg.package-operator.run/boxcutter/managedcache.(*objectBoundAccessManagerImpl[...]).handleAccessorRequest.func1(0xc0000584d0)
	pkg.package-operator.run/boxcutter@v0.1.0/managedcache/objectboundaccess.go:309 +0xaf
created by pkg.package-operator.run/boxcutter/managedcache.(*objectBoundAccessManagerImpl[...]).handleAccessorRequest in goroutine 217
	pkg.package-operator.run/boxcutter@v0.1.0/managedcache/objectboundaccess.go:307 +0xb6c
```

Co-Authored-By: Nico Schieder <nschieder@redhat.com>
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>
…etInformer instead of cache.GetInformerForKind to avoid a scheme lookup error

Error: object /a-foo kind:Foo: getting k8s.erdii.net/v1, Kind=Foo: no kind \"Foo\" is registered for version \"k8s.erdii.net/v1\" in scheme \"pkg/runtime/scheme.go:100\"

we're using controller-runtime's informerCache [1] and that implementation's GetInformerForKind tries to instanciate a new typed struct for the given gvk [2]. This does not work because the scheme does not contain the type.

[1] https://github.com/kubernetes-sigs/controller-runtime/blob/6ad5c1dd4418489606d19dfb87bf38905b440561/pkg/cache/informer_cache.go#L67
[2] https://github.com/kubernetes-sigs/controller-runtime/blob/6ad5c1dd4418489606d19dfb87bf38905b440561/pkg/cache/informer_cache.go#L155
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 46.06%. Comparing base (4a284db) to head (accb5a8).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
managedcache/trackingcache.go 0.00% 19 Missing ⚠️
managedcache/gvk.go 0.00% 6 Missing ⚠️
managedcache/objectboundaccess.go 0.00% 2 Missing ⚠️
cmd/reference/internal/reference.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
- Coverage   46.29%   46.06%   -0.24%     
==========================================
  Files          29       30       +1     
  Lines        2985     3000      +15     
==========================================
  Hits         1382     1382              
- Misses       1492     1507      +15     
  Partials      111      111              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants