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
inconsistent refusal of bodhi override with maximum duration #4182
Comments
Hi, |
Also, what is optimal buildroot_limit should be defined? What's the ideal duration for overrides that needs to be set? Herewith reference to the source:
The issue talks about the inconsistency caused in the error message that 31 is no longer than 31, two things (the error message should be re-written (longer and equal to), also, if we have allowed the duration to 31 this should work right?) CC: @keszybz |
Hi @samyak-jn , About the time limit, just change the check so that it is not so pedantic... ;-) |
Thanks, @mattiaverga, will do the changes in the check and also update the error message so that it won't confuse the user. |
From https://bugzilla.redhat.com/show_bug.cgi?id=1761691:
Obviously the user is asking for a duration of 31 days which is not "longer than 31".
fedpkg-1.37-5.el8.1.noarch
Creating the update with --duration=30 works.
Looking at the code
bodhi/bodhi/server/validators.py
Lines 1207 to 1216 in b81c9fb
it's a toctou issue:
expiration_date
is calculated first, and then whennow + timedelta(days=config.get('buildroot_limit'))
is calculated the result is tiny bit off, so the check fails.The text was updated successfully, but these errors were encountered: