Upgrade Python Packages#12277
Conversation
…grade-python-packages
|
@tino097, as I understand uv.lock and *.txt files were generated, right? How they were generated? |
|
Adding new packages would be done with the As for the And for the generating the @ea-rus any suggestions/concerns over this ? |
StpMax
left a comment
There was a problem hiding this comment.
Just some thoughts:
I'm not sure the changes in this PR will actually solve the problem of growing number of Snyk and Dependabot vulnerability reports caused by unpinned transitive dependencies. All the Snyk-based changes that have been merged into the project so far constrain libraries with >= only. Pinning the versions of all shared libraries won't reduce the number of PRs from Snyk.
I'm also concerned that we're ending up with some kind of mix between pyproject.toml-style and setup.py-style. Ideally we should pick one or the other (i'd prefer pyproject.toml, since setup.py is legacy). We now have two sources of truth for the dependency list: pyproject.toml and requirements-*.txt. Moreover, the values in pyproject.toml aren't really "truth" — they're more like "suggestions", since for example it says pydantic ~= 2.12 while requirements.txt has pydantic==2.12.5. This is confusing.
Maybe we should get rid of the requirements-*.txt files and setup.py entirely, and keep only pyproject.toml? And pin specific dependency versions there. That would make everything much simpler.
|
Hey @StpMax, as we discussed The intent is:
So there's really one source of truth ( Regarding the Snyk scenarios as an example: If we install So when the and we can re-export the requirements files with those changes |
…grade-python-packages
|
@tino097 I still hold the opinion that having
So in this case, Speaking of CVE reports in general — most of them look like If all our dependencies are pinned, the only scenario where we wouldn't get a report/PR is if a vulnerability is introduced in a newer version of a library that is higher than what we have pinned. So, as i see it, the proposed changes won't help solve the problem of the "growing number of Snyk and Dependabot vulnerability reports caused by unpinned transitive dependencies". On top of that, we will have new issues (as i described above) — for example, mismatch between declared dependencies (in As a temporary solution, while Snyk doesn't yet support reading |
|
Hey @StpMax, good points overall, let me try to clarify a few things.
We dont manually edit these files at all they are fully generated from
Agreed and the workflow is:
The value of having pinned transitive deps in the exported requirements files is exactly what you said, it will give Snyk accurate version information to report against, rather than guessing. So as a conclusion, maybe the statement that we wont get many reports is not practically correct but we will have a clear pathway of improving the dependency management and handling the reports edit: i will fix the typos and move |
6d0ebcc to
d05c973
Compare
|
@tino097 we might want to update Im also hoping we can get rid of all of the cross-requirement.txt checks and just run validate-pyproject or something |
…grade-python-packages
I've missed this comment, but its really helpful, thanks @hamishfagg !!! Additionally we will remove community handlers with #12250 |
…grade-python-packages
|
This PR didn't helped a lot with its intention, it will be closed |
This PR introduces managed dependency resolution using uv lock, upgrading all Python packages to their latest compatible versions. This directly addresses the growing number of Snyk and Dependabot vulnerability reports caused by unpinned transitive dependencies.
https://linear.app/mindsdb/issue/FQE-1840/pin-dependencies-in-requirementstxt-from-to-for-stability
What changed:
Steps for verification:
snykconfig fileuv.lockfilerequirements-*.txtfilesConfidence Score: 5/5 - Safe to Merge