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

Performance warning with UUIDList() and SQLAlchemy for a self-hosted server #17231

Closed
Andrew-S-Rosen opened this issue Feb 21, 2025 · 0 comments · Fixed by #17232
Closed

Performance warning with UUIDList() and SQLAlchemy for a self-hosted server #17231

Andrew-S-Rosen opened this issue Feb 21, 2025 · 0 comments · Fixed by #17232
Assignees
Labels
bug Something isn't working

Comments

@Andrew-S-Rosen
Copy link
Contributor

Bug summary

I am running a self-hosted prefect server. When I clicked on a flow run in the UI, the following is printed out to the terminal where the server is being run:

/home/asrosen/.conda/envs/prefect/lib/python3.11/site-packages/prefect/server/utilities/database.py:335: SAWarning: TypeDecorator UUIDList() will not produce a cache key because the ``cache_ok`` attribute is not set to True.  This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions.  Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this warning at: https://sqlalche.me/e/20/cprf)
  for bp in query._get_embedded_bindparams()  # pyright: ignore[reportPrivateUsage]

I suppose it would be worth addressing this by setting cache_ok in UUIDList().

Version info

Version:             3.2.6
API version:         0.8.4
Python version:      3.11.11
Git commit:          5ceb3ada
Built:               Wed, Feb 19, 2025 9:24 PM
OS/Arch:             linux/x86_64
Profile:             local
Server type:         server
Pydantic version:    2.10.6
Integrations:
  prefect-dask:      0.3.3

Additional context

No response

@Andrew-S-Rosen Andrew-S-Rosen added the bug Something isn't working label Feb 21, 2025
@cicdw cicdw self-assigned this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants