addon-oam-kubernetes-local icon indicating copy to clipboard operation
addon-oam-kubernetes-local copied to clipboard

error is not returned as expected

Open captainroy-hy opened this issue 5 years ago • 2 comments

https://github.com/crossplane/addon-oam-kubernetes-local/blob/ed2006d2fe040237d332e8af94878421000fb055/pkg/controller/core/traits/manualscalertrait/manualscalertrait_controller.go#L141

If there's error returned from client.Get, it will not be returned because of errors.Wrap in until.PatchCondition. fetchWorkload may always return nil error. Then downstream check for err != nil may make no more sense.

captainroy-hy avatar Jul 01 '20 09:07 captainroy-hy

Can you help give a fix?

wonderflow avatar Jul 02 '20 02:07 wonderflow

Can you help give a fix?

Yes, I will fix it.

captainroy-hy avatar Jul 02 '20 02:07 captainroy-hy