Repository navigation
[MAIN-553] Create explicit executors to limit threadcount - #82
Conversation
Avi-Robusta
left a comment
There was a problem hiding this comment.
Looks good, I had one thing I wanted clarity for.
Also I thought we discussed also adding rate limiting in the meeting too.
This could cause break on runner so I would like you to check the time it takes to run on average since by default runner waits only five minutes
I have tested the different multithreading settings and the result is: For bigger count of threads the speed increased. 6 threads consumed more memory of prometheus then 32, but I think we need to have a bigger test with a bigger cluster (32+ cores for a node, 300+ pods). I am providing a CLI argument to change the amount of max workers. If bigger tests show that 6 is still to much, we will be able to decrease the default value, but for now it should do the work. |
|
Keep in mind that performance is soon to be optimized by decreasing the amount of queries to prometheus. |
## Summary - **idna** 3.7 -> 3.15 in `pyproject.toml`, `poetry.lock` and `requirements.txt`: CVE-2026-45409 (Medium). Closes dependabot alerts #82, #83, #84. - **Dockerfile**: remove ensurepip's bundled `pip-25.0.1-py3-none-any.whl` from `python:3.12-slim`. The installed pip is already upgraded to 26.x, but the leftover wheel is what Artifact Registry flags on `devel/krr` for CVE-2025-8869, CVE-2026-3219, CVE-2026-6357, CVE-2026-8643 (Medium). ## Verification - `poetry lock --no-update` (Poetry 1.8.5): only idna changes in the lock - `pytest`: 55 passed - Built the image (`linux/arm64`): idna 3.15, pip 26.2.1, `ensurepip/_bundled/` empty, `import robusta_krr` and `krr.py --help` work - `grype` on the new image: no matches for idna, pip or any of the CVEs above (the current `devel/krr:fix_cves_2` image shows GHSA-65pc-fj4g-8rjx on idna 3.7) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: avi@robusta.dev <avi@robusta.dev> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace
asyncio.to_threadtoloop.run_in_executorto explicitly provide executor.Default python
max_thread_countturned out to eat away lots of resources or even kill prometheus on big k8s nodes.Note: