Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Sync go.(mod/sum) with argo-cd 1.8 release #89

Merged
merged 3 commits into from Jan 12, 2021
Merged

Sync go.(mod/sum) with argo-cd 1.8 release #89

merged 3 commits into from Jan 12, 2021

Conversation

kvendingoldo
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jan 10, 2021

CLA assistant check
All committers have signed the CLA.

@kvendingoldo kvendingoldo changed the title Sync go.(mod/sum) with argo-cd 1.8 release WIP: Sync go.(mod/sum) with argo-cd 1.8 release Jan 10, 2021
@kvendingoldo
Copy link
Contributor Author

@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.

@kvendingoldo kvendingoldo changed the title WIP: Sync go.(mod/sum) with argo-cd 1.8 release Sync go.(mod/sum) with argo-cd 1.8 release Jan 11, 2021
@kvendingoldo
Copy link
Contributor Author

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 {
Copy link
Collaborator

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.

Copy link
Member

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...

Copy link
Contributor Author

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

Copy link
Member

@jgwest jgwest left a 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 {
Copy link
Member

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...

@kvendingoldo
Copy link
Contributor Author

@wtam2018 @jgwest it's fixed, thank you for your attention :)

Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wtam2018
Copy link
Collaborator

/LGTM

@jgwest jgwest merged commit e891dd0 into argoproj:master Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants