-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor approve_testing.py and set date_approved consistently
This was a logical consequence of the previous change to drop a branch in check_karma_thresholds. That change affected when date_approved got set, and investigating that, I realized it is not set at all consistently. With this, we consistently set date_approved to be the first time - now always as a `datetime.datetime` instance - an update becomes eligible for manual push. Previously it was sometimes set then, sometimes set when an update was autopushed, and sometimes never set at all. We also drop an early bailout in approve_testing.py that is no longer ever hit in the real world. It initially bailed any time the release had no "mandatory days in testing", which would have been true for Rawhide (and early Branched). But when autotime was added, it was changed to bail only if the release had no mandatory days in testing *and* the update did not have autotime set. Updates for Rawhide and other releases like it (ones not "composed by Bodhi") are always forced to have autotime enabled, and all releases that *are* "composed by Bodhi" have mandatory days in testing, so we just never really satisfy the conditions any more. I verified this by asking nirik to check Bodhi's logs for the message that should be logged when this bailout is hit; there were no occurrences of it. Anyway, I don't think an early bailout is ever really justifiable any more, because we have gating checks for all branches of Fedora these days. This refactors approve_testing a bit just to make the different paths through it clearer, and separate different work into different functions. We also add comments to make it clearer how the different autopush paths actually *work*, which was not at all clear to me before researching this commit. Signed-off-by: Adam Williamson <[email protected]> (cherry picked from commit bddee6a)
- Loading branch information
1 parent
329f426
commit 7a415ad
Showing
3 changed files
with
177 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.