kubernetes-testing-framework
kubernetes-testing-framework copied to clipboard
Introduce more standardised logging and error returning strategy
Is there an existing issue for this?
- [X] I have searched the existing issues
Problem Statement
Currently, KTF for logging uses fmt.Printf
. Furthermore, sometimes errors are returned and sometimes just logged, e.g., in function WaitForConnectionOnServicePort
during EndpointSlices
cleanup, instead of being returned to the caller with other errors.
Other projects (KGO and KIC) use
github.com/go-logr/logr
github.com/go-logr/zapr
hence KTF should use them too.
Proposed Solution
Introduce a more standardized way of dealing with such situations across the codebase.
Acceptance Criteria
- [ ] standardized approach for logging
- [ ] errors are rather returned to the caller instead of being logged by KTF