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

fix(relationship): fix bug in extractRelationshipFromAspect #482

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

jsdonn
Copy link
Contributor

@jsdonn jsdonn commented Nov 27, 2024

Summary

There is a bug in metadata-store integration tests:

com.linkedin.metadata.dao.RestliClientStatusException: com.linkedin.restli.client.RestLiResponseException: Response status 500, serviceErrorMessage: java.lang.ClassCastException: class com.linkedin.common.EntityComplianceAnnotation cannot be cast to class java.util.List (com.linkedin.common.EntityComplianceAnnotation is in unnamed module of loader 'app'; java.util.List is in module java.base of loader 'bootstrap')

This is because RecordTemplates are first checked to see if they are relationships. If not, the previous logic will assume that they are lists. But this is not the case if they are other structs. The fix is to add a check to see if it is a list. If it's not, just return.

Testing Done

update unit test

Checklist

@jsdonn jsdonn changed the title fix(relationship): catch cast exceptions in extractRelationshipFromAspect fix(relationship): fix bug in extractRelationshipFromAspect Nov 27, 2024
@jsdonn jsdonn marked this pull request as ready for review November 27, 2024 22:19
Copy link
Contributor

@ybz1013 ybz1013 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix

@jsdonn jsdonn merged commit 3644f12 into linkedin:master Nov 27, 2024
2 checks passed
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.

2 participants