-
Notifications
You must be signed in to change notification settings - Fork 6
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
Extraneous log messages within validate function #180
Comments
Hey @carolyn-lyra, I suspect those logs are coming from protovalidate-python's usage of the cel-python library — there's a related issue on that repo about extraneous logging; can you try out the code snippet in the comment to see if it fixes the extra logging? And let us know if the hanging still occurs with that change in place. |
Thanks, this fixed the logging issue for us! We'll deploy to a test environment to see if the performance issue still persists. |
Hey @stefanvanburen - unfortunately, we're still seeing the latency increase issue even after deploying your suggested logging fix. The validate step is taking on average over 5 seconds to complete, and sometimes spiking over 10 seconds. For additional context, our service's payloads are often times quite large (a few thousand fields per payload), but this wasn't an issue when we were using |
Hey @carolyn-lyra, I don't think we've seen similar increases so far. Just to confirm, you're re-using the same exported I suspect that most of the slowness can be traced down to cel-python (one related issue in cloud-custodian/cel-python#68, and I've asked about a new release as there have been some performance improvements since the last one). However, any additional details you can provide us from your end in order to reproduce the slowness would be great! |
Hi @stefanvanburen - Thanks for linking the issues for context. I've pasted a scrubbed version of the Protobuf message below with the latency regression. Typically, the repeated field
|
Hi @stefanvanburen, following up on this - any updates on the performance issue? |
hey @carolyn-lyra, no current updates; I still suspect most of the perf gains we can expect come from upstream improvements and a release. It'd be nice to convert your case above into a benchmark that we can look to confirm that intuition, but I'm not sure when I'll have time to take a look at that. Open to a PR or a demo repo for further investigation, though! |
Description
We are integrating protovalidate for Protobuf validation in a Python service and noticing thousands of strange log messages coming from within
validate(request)
.Steps to Reproduce
We have the following in
requirements.txt
:protovalidate==0.3.1
And in our
middleware.py
:Expected Behavior
Validation function should not log extraneous messages.
Actual Behavior
Tens of thousands of log messages such as:
coming from within the
validate
function.Additionally, we're finding that the validate function hangs for > 10 seconds.
Screenshots/Logs
Environment
Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered: