-
Notifications
You must be signed in to change notification settings - Fork 309
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
integrate with lower-bound-checker
to ensure constraints files stay in sync with setup.py
#1974
Comments
I'm not sure if it's a good idea, but we can add |
That could work. I would expect owlbot to generate the constraints and noxfile to check them. I'm not sure how well the generation works, but if it does let's use it. |
I walked through the code in that PR. I am presuming we are considering importing this If yes, we should also mirror that same process to the other repos that have lower bounds in their constraints files. As for doing the checks... These folks have two separate nox sessions in their nox file:
The |
We already install
Yes, I think the lint for the setup.py file would be a good spot for that.
I was thinking owlbot could do this too, just like we run our blacken session Line 104 in 4383cfe
|
The way the current code functions, lines such as this in
Lines with two endpoints is fine, but adding the extraneous versions fails.
Order does not matter. Putting the 4.* versions between the two endpoints does not help. Similarly, putting spaces between the values after each comma makes no difference.
|
@tswast do you have strong feelings about this Issue? Some more context: Their
It may be possible to issue a PR (or request this feature) to add something to their code to account for more complex situations... there would need to be an accounting for edge cases, (are the != versions in the middle of the pack, at the end, at the beginning) etc. Would need to include tests. Another option is to not have requirements that are that complex, but sometimes we can't get around it (especially when there is a broken dependency that we need to weed out). In a check of the other repos in googleapis, a declaration to not use a specific version shows up ~450 times. Typically, but not exclusively, relative to |
I think we've had a couple times in the last year of setup.py and constraints getting out of sync. These cause real customer issues where they end up with incompatible versions because we didn't test with our minimum advertised dependency versions. IMO some automation is a high priority to prevent such errors in future. A contribution to google-cloud-testutils seems the right approach, but certainly there are alternatives like using the uv package manager to install instead of pip, since uv has a flag to install minimum supported versions instead of latest. |
See: googleapis/python-test-utils#8 and #1972 (comment)
The text was updated successfully, but these errors were encountered: