kubernetes-testing-framework icon indicating copy to clipboard operation
kubernetes-testing-framework copied to clipboard

Introduce more standardised logging and error returning strategy

Open programmer04 opened this issue 1 year ago • 0 comments

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

programmer04 avatar May 10 '23 07:05 programmer04