What happened?
Three error formatting issues in pkg/controller.v1beta1/trial/:
-
trial_controller_util.go:229 uses %e (scientific notation for floats) instead of %w. Produces garbage output like &{%!e(string=connection refused)} on timestamp parse errors.
-
trial_controller.go:61-63 sentinel errors use fmt.Errorf() instead of errors.New(). These are compared with errors.Is() so they should be immutable sentinels
-
trial/util/job_util.go:82,103 uses %v instead of %w, breaking the error chain for errors.Is() and errors.As() callers
What did you expect to happen?
Errors should use correct format verbs and follow Go error handling conventions.
Environment
Spotted while reading through the trial controller code
Impacted by this bug?
Give it a 👍 We prioritize the issues with most 👍
What happened?
Three error formatting issues in
pkg/controller.v1beta1/trial/:trial_controller_util.go:229uses%e(scientific notation for floats) instead of%w. Produces garbage output like&{%!e(string=connection refused)}on timestamp parse errors.trial_controller.go:61-63sentinel errors usefmt.Errorf()instead oferrors.New(). These are compared witherrors.Is()so they should be immutable sentinelstrial/util/job_util.go:82,103uses%vinstead of%w, breaking the error chain forerrors.Is()anderrors.As()callersWhat did you expect to happen?
Errors should use correct format verbs and follow Go error handling conventions.
Environment
Spotted while reading through the trial controller code
Impacted by this bug?
Give it a 👍 We prioritize the issues with most 👍