| |
@@ -1,6 +1,7 @@
|
| |
#!/usr/bin/python3
|
| |
|
| |
import configparser
|
| |
+ from datetime import datetime
|
| |
import bugzilla
|
| |
import pathlib
|
| |
import sys
|
| |
@@ -20,7 +21,7 @@
|
| |
|
| |
# get the latest Fedora version and tracking bug
|
| |
for key, value in massrebuildsinfo.MASSREBUILDS.items():
|
| |
- fedora = key.upper()
|
| |
+ fedora = key.upper().replace('F', '')
|
| |
tracking = value['tracking_bug']
|
| |
break
|
| |
|
| |
@@ -51,8 +52,12 @@
|
| |
acknowledge this. Following the latest policy for such packages [2], your package
|
| |
can be orphaned if this bug remains in NEW state more than 8 weeks.
|
| |
|
| |
+ A week before the mass branching of Fedora {int(FEDORA)+1} according to the schedule [3],
|
| |
+ any packages which still have open FTBFS bugs from Fedora {FEDORA} will be retired.
|
| |
+
|
| |
[1] https://fedoraproject.org/wiki/Updates_Policy
|
| |
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
|
| |
+ [3] https://fedoraproject.org/wiki/Releases/{int(FEDORA)+1}/Schedule
|
| |
""" # noqa
|
| |
|
| |
cache_dir = pathlib.Path('~/.cache/FTBFS_weekly_reminder/').expanduser()
|
| |
@@ -79,13 +84,16 @@
|
| |
}
|
| |
|
| |
|
| |
- def send_reminder(bug, comment=TEMPLATE):
|
| |
- flags = [needinfo(bug.assigned_to)]
|
| |
+ def send_reminder(bug, comment=TEMPLATE, set_needinfo=True):
|
| |
+ flags = [needinfo(bug.assigned_to)] if set_needinfo else []
|
| |
update = bzapi.build_update(comment=comment, flags=flags)
|
| |
try:
|
| |
bzapi.update_bugs([bug.id], update)
|
| |
- except Exception:
|
| |
+ except Exception as e:
|
| |
LOGGER.exception(bug.weburl)
|
| |
+ if "You can't ask" in getattr(e,'faultString', ''):
|
| |
+ print(e.faultString, file=sys.stderr)
|
| |
+ return send_reminder(bug, comment=comment, set_needinfo=False)
|
| |
failed.append(bug)
|
| |
else:
|
| |
updated.append(bug)
|
| |
@@ -93,12 +101,17 @@
|
| |
print(bug.id, file=f)
|
| |
|
| |
|
| |
+ today = datetime.today()
|
| |
if ALREADY_FILED.exists():
|
| |
- print(f'Loading bug IDs from {ALREADY_FILED}. Will not fill those. '
|
| |
- f'Remove {ALREADY_FILED} to stop this from happening.')
|
| |
- ignore = [
|
| |
- int(line.rstrip()) for line in ALREADY_FILED.read_text().splitlines()
|
| |
- ]
|
| |
+ age = today - datetime.fromtimestamp(ALREADY_FILED.stat().st_mtime)
|
| |
+ # we gracefully approximate a "less than a week" age here
|
| |
+ # the file is intended for immediate repeated runs, not forever
|
| |
+ if age.days < 6:
|
| |
+ print(f'Loading bug IDs from {ALREADY_FILED}. Will not fill those. '
|
| |
+ f'Remove {ALREADY_FILED} to stop this from happening.')
|
| |
+ ignore = [
|
| |
+ int(l.rstrip()) for l in ALREADY_FILED.read_text().splitlines()
|
| |
+ ]
|
| |
else:
|
| |
ignore = []
|
| |
|
| |
The retirement will happen on 2019-08-08, that is ~6.5 weeks from now, time to be loud about that.
Also hopefully fix https://pagure.io/releng/issue/7718#comment-580283