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

func cache: fix dropping extension with scalar type #7564

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

fantix
Copy link
Member

@fantix fantix commented Jul 16, 2024

Scalar types in extensions may define sql_type thus not using common.get_backend_name(). Instead, here I think we should use types.pg_type_from_scalar() to cover more cases.

This is a follow up fix for d1b2c4d, captured in edgedb-js CI. This should've been caught by #7497, I'll double check why it didn't, and make sure either it does, or write a new test in this PR.

Manually tested for enum tuples as well as the pgvector vector type.

Scalar types in extensions may defined `sql_type` thus not using
`common.get_backend_name()`. Instead, here I think we should use
`types.pg_type_from_scalar()` to cover more cases.
@fantix fantix requested a review from msullivan July 16, 2024 17:48
@fantix
Copy link
Member Author

fantix commented Jul 16, 2024

We do need a separate test here. The EXTENSIONS in TestEdgeQLVector is only created once and reused in the zREPEAT test cases, while test_edgeql_extensions didn't really address the case we're fixing here.

@fantix fantix force-pushed the fix-func-cache-drop-scalar-type-in-ext branch from c2c030c to bd102fe Compare July 16, 2024 21:09
@fantix fantix merged commit 1664daa into master Jul 22, 2024
23 checks passed
@fantix fantix deleted the fix-func-cache-drop-scalar-type-in-ext branch July 22, 2024 16:49
aljazerzen pushed a commit that referenced this pull request Oct 23, 2024
Scalar types in extensions may defined `sql_type` thus not using
`common.get_backend_name()`. Instead, here I think we should use
`types.pg_type_from_scalar()` to cover more cases.

Also fixed a flaky test.
@aljazerzen aljazerzen added the backported-5.x PRs that *have* been backported to 5.x (starting with 5.3) label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-5.x PRs that *have* been backported to 5.x (starting with 5.3)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants