SophieTech88 opened a new pull request, #850:
URL: https://github.com/apache/yunikorn-k8shim/pull/850
### What is this PR for?
There are many different errors or warnings for `make lint`. This PR tries
to solve the unchecked error which relates to 5 files.
The errors looks like below:
pkg/admission/conf/am_conf.go:121:39: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked
(errcheck)
configMaps.Informer().AddEventHandler(&configMapUpdateHandler{conf:
acc})
^
pkg/admission/namespace_cache.go:61:40: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked
(errcheck)
namespaces.Informer().AddEventHandler(&namespaceUpdateHandler{cache: nsc})
^
pkg/admission/priority_class_cache.go:44:45: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked
(errcheck)
priorityClasses.Informer().AddEventHandler(&priorityClassUpdateHandler{cache:
pcc})
^
test/e2e/framework/helpers/k8s/k8s_utils.go:719:46: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked
(errcheck)
configMapInformer.Informer().AddEventHandler(eventHandler)
^
pkg/client/apifactory.go:177:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:180:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:183:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:186:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:189:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:192:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
pkg/client/apifactory.go:195:35: Error return value of
`(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandlerWithResyncPeriod`
is not checked (errcheck)
AddEventHandlerWithResyncPeriod(handler,
resyncPeriod)
^
Actions:
* log out the errors for these 11 unchecked errors in 5 files.
### What type of PR is it?
* [x] - Bug Fix
* [ ] - Improvement
* [ ] - Feature
* [ ] - Documentation
* [ ] - Hot Fix
* [ ] - Refactoring
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-182
### How should this be tested?
It should pass all CI test.
`make test` passed locally.
### Screenshots (if appropriate)
<img width="869" alt="截屏2024-05-25 下午11 58 16"
src="https://github.com/apache/yunikorn-k8shim/assets/141538510/c0c7b75b-a250-4827-842b-08bb92c991c5">
### Questions:
* [ ] - The licenses files need update.
* [ ] - There is breaking changes for older versions.
* [ ] - It needs documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]