crossplane-runtime icon indicating copy to clipboard operation
crossplane-runtime copied to clipboard

Add EquateParameters cmp helper

Open negz opened this issue 5 years ago • 6 comments

What problem are you facing?

https://github.com/crossplaneio/stack-gcp/pull/151/files?file-filters%5B%5D=.go#diff-888e0ec46a21ebd2bbdc8d86d4553d9bR92

	return cmp.Equal(in, currentParams, cmpopts.IgnoreInterfaces(struct{ resource.AttributeReferencer }{}))

We frequently use the above cmpopt when determining whether managed resources are equivalent in the IsUpToDate method of each resource's controller. The readability of this option is a little opaque in how it relates to Crossplane.

How could Crossplane help solve your problem?

Perhaps we should add a function like our existing EquateErrors that equates managed resource parameters? This could just be an abstraction on IgnoreInterfaces to begin with.

negz avatar Feb 07 '20 02:02 negz

Hi @negz, is this issue still valid ?? If yes, I would like to work on this.

aditya109 avatar Jan 25 '22 16:01 aditya109

I believe so! CC @muvaf who may have an opinion here.

negz avatar Jan 25 '22 18:01 negz

Thanks, I will pick this up then.

aditya109 avatar Jan 26 '22 07:01 aditya109

Hi! I think resource.AttributeReferencer is remnant of the old approach we had taken back then. All reference-related functionality resides in pkg/reference package. In fact pkg/resource/reference.go can be deleted, @aditya109 this could be your first contribution 🙂

muvaf avatar Jan 26 '22 09:01 muvaf

Thanks @muvaf, will keep it in mind. Excited to try working on this repo.

aditya109 avatar Jan 26 '22 09:01 aditya109

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 07:08 stale[bot]

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] avatar Sep 05 '24 01:09 github-actions[bot]