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: Avoid recursion during identity features validation #201

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

khvn26
Copy link
Member

@khvn26 khvn26 commented Jan 17, 2024

This fixes a performance regression where the unique identity feature states validation function was being executed recursively due to slicing the pydantic_collections.BaseCollection during its validation.

The changes make sure that only the underlying list gets sliced.

@khvn26 khvn26 requested review from a team and novakzaballa and removed request for a team January 17, 2024 13:02
Copy link

File Coverage
All files 100%

Minimum allowed coverage is 100%

Generated by 🐒 cobertura-action against 8a52109

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

Looks good, are there any tests we can add to reproduce the (now fixed) bug?

@khvn26
Copy link
Member Author

khvn26 commented Jan 17, 2024

@matthewelwell Can't imagine writing those without heavily mocking the pydantic_collections internal which I'd like to avoid.

Ideally we need to add identity data with varied number of overrides to the common engine_test_data repository and write identity tests around it.

@khvn26 khvn26 merged commit 4a257e1 into main Jan 17, 2024
4 checks passed
@khvn26 khvn26 deleted the fix/avoid-recursion branch January 17, 2024 15:31
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