Sync go.(mod/sum) with argo-cd 1.8 release #89
Conversation
@jgwest @OmerKahani @wtam2018 @xianlubird can you check what is wrong with the unit test for generators/cluster, please? I see that it's the wrong order but in the general result the same. |
@jgwest @dgoodwin @mgoodness @OmerKahani @wtam2018 @xianlubird please, review |
return controllerutil.OperationResultNone, err | ||
func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error) { | ||
key := client.ObjectKeyFromObject(obj) | ||
if err := c.Get(ctx, key, obj); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you copy this if-block by mistake? It looks like an exact copy of the one below it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question as @wtam2018 , the first and second if block appear to be the same, unless there is a subtle difference hiding in there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's copy-paste issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kvendingoldo, looks great! Check out our question re: createOrUpdate.go
, and let us know if this was intentional...
return controllerutil.OperationResultNone, err | ||
func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error) { | ||
key := client.ObjectKeyFromObject(obj) | ||
if err := c.Get(ctx, key, obj); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question as @wtam2018 , the first and second if block appear to be the same, unless there is a subtle difference hiding in there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/LGTM |
No description provided.