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

[release/8.0] Fix to #32217 - Nav expansion visitor does not visit the Contains item argument (and possibly other non-lambda arguments) #32317

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Nov 16, 2023

Fixes #32217
Fixes #32312

Description
We were not visiting non-lambda members of some Queryable operators. This was always a problem but was uncovered by change in how we process Contains.

Customer impact
Some queries using Contains, specifically ones that use navigations inside the argument to the Contains method now throw, where they used to work.

How found
Found by a customer as well as EF Core team member independently.

Regression
Yes.

Testing
Added tests.

Risk
Low: We add visitation step for the arguments of some methods. This is effectively what we used to do in 7.0 (before 8.0 changes, Contains used to be handled by ProcessUnknownMethod which visits all its arguments). For extra safety, added two separate quirks: one for Contains, which is a reported regression, and one for other methods that have exactly the same bug (Skip, Take, ElementAt) for which don't have a clear regression scenario yet.

…m argument (and possibly other non-lambda arguments)

This was always a problem but was uncovered by change in how we process Contains. We were going through the full process of nav expansion on the argument (only on the source), which could lead to untranslatable expression tree in some cases.

Fixes #32217
Fixes #32312
@AndriySvyryd
Copy link
Member

Note that the branch is closed for 8.0.1

@ajcvickers ajcvickers modified the milestones: 8.0.x, 8.0.2 Nov 17, 2023
@ajcvickers
Copy link
Member

@maumar Can we cherry-pick these patches on to main, since I'm not sure how long release/8.0 will be closed for, and it would be good to get these fixes into the daily builds so people can try them?

@leecow leecow modified the milestones: 8.0.2, 8.0.1 Nov 17, 2023
@AndriySvyryd AndriySvyryd merged commit 6980d92 into release/8.0 Nov 17, 2023
7 checks passed
@AndriySvyryd AndriySvyryd deleted the fix32217_80 branch November 17, 2023 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants