Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat all maps & slices of zero-length equal whether they are nil or not in managed.APISimpleReferenceResolver #618

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

ulucinar
Copy link
Contributor

@ulucinar ulucinar commented Dec 4, 2023

Description of your changes

Fixes #617

This PR passes the cmpopts.EquateEmpty() option when the managed.APISimpleReferenceResolver is checking whether any reference fields (Ref fields if a label selector is specified and the reference target fields) have been set by the downstreamResolveReferences call, so that all maps & slices of zero-length will be considered as equal whether they are nil or empty.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Tested with a custom build of upbound/provider-aws.

…not in managed.APISimpleReferenceResolver

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@ulucinar ulucinar requested review from a team as code owners December 4, 2023 15:51
@ulucinar ulucinar requested review from negz and ezgidemirel December 4, 2023 15:51
Copy link
Member

@turkenh turkenh left a comment

Choose a reason for hiding this comment

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

Thank you @ulucinar 🙌

@turkenh turkenh merged commit 4697781 into crossplane:master Dec 5, 2023
8 checks passed
@ulucinar ulucinar deleted the fix-617 branch December 5, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Treat all maps & slices of zero-length equal whether they are nil or not in managed.APISimpleReferenceResolver
2 participants