#6925 Fix updates that have gotten out of sync with their builds' koji tags
Closed: Fixed 2 years ago Opened 2 years ago by bowlofeggs.

  • Describe what you need us to do:
    Due to a bug in Bodhi's test gating code, Bodhi crashed after tagging a group of builds into f26-updates yesterday. Now those builds' updates are all stuck in limbo because they are marked testing while their builds are marked for stable. I believe we can fix this by moving those builds back to f27-updates-testing and then re-requesting the updates for stable. Here are some commands to do that:
# Tag the builds back to f26-updates-testing.
$ for b in {R-commonmark-1.5-1.fc26,R-reticulate-1.7-1.fc26,adapta-gtk-theme-3.93.1.1-1.fc26,auter-0.11-5.fc26,ckeditor-4.9.2-1.fc26,dar-2.5.15-1.fc26,dehydrated-0.6.2-1.fc26,drupal7-7.59-1.fc26,hamlib-3.2-1.fc26,jpegoptim-1.4.6-1.fc26,knot-resolver-2.3.0-1.fc26,libnfs-1.11.0-1.fc26,magic-8.1.211-1.fc26,nfdump-1.6.17-1.fc26,nodejs-6.14.2-1.fc26,pag-0.8-1.fc26,perl-bareword-filehandles-0.006-1.fc26,perl-multidimensional-0.014-1.fc26,php-paragonie-random-compat-2.0.12-1.fc26,php-simplesamlphp-saml2_3-3.1.5-1.fc26,python-bitcoinlib-0.10.1-1.fc26,python-neomodel-3.2.8-1.fc26,redhat-rpm-config-66-1.fc26,rtorrent-0.9.6-11.fc26,rubygem-cairo-1.15.13-1.fc26,rubygem-domain_name-0.5.20180417-1.fc26,variety-0.6.8-2.fc26,verbiste-0.1.45-1.fc26,vim-8.0.1788-1.fc26}; do koji move f26-updates f26-updates-testing $b; done;

# Re-request the updates for those builds to go to stable.
$ for u in {FEDORA-2018-01a32ee53c,FEDORA-2018-03418b6945,FEDORA-2018-06b21886b7,FEDORA-2018-0c0671072b,FEDORA-2018-1193cf510f,FEDORA-2018-1361f39801,FEDORA-2018-1a09212f21,FEDORA-2018-1cd5503c53,FEDORA-2018-2359c2ae0e,FEDORA-2018-3b8ba12b38,FEDORA-2018-3cfb5c5fa9,FEDORA-2018-4431aaaba7,FEDORA-2018-482a72b631,FEDORA-2018-531bf59956,FEDORA-2018-5a3b5b1278,FEDORA-2018-657ddaaaac,FEDORA-2018-6a8ba25ddd,FEDORA-2018-6d82adbfeb,FEDORA-2018-6dde187524,FEDORA-2018-6fb1f8ac3b,FEDORA-2018-9dc3a15a3a,FEDORA-2018-c4f0b23dd9,FEDORA-2018-ca51131132,FEDORA-2018-ce53a35ab0,FEDORA-2018-e07b31dddd,FEDORA-2018-e61a47794d,FEDORA-2018-f150cc029d,FEDORA-2018-f170e6da05,FEDORA-2018-f2a64848c9}; do bodhi updates request $u stable; done;
  • When do you need this? (YYYY/MM/DD)
    ASAP

  • When is this no longer needed or useful? (YYYY/MM/DD)
    When we stop using Bodhi.

  • If we cannot complete your request, what is the impact?
    The updates will be stuck in updates testing. Their builds might make it to stable in the Pungi compose (not sure about this?), but the Bodhi DB will be out of sync with Koji's tags for sure.

For the record, here is how I generated those commands:

I started by looking at the Bodhi backend logs:

May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving R-commonmark-1.5-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving R-reticulate-1.7-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving adapta-gtk-theme-3.93.1.1-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving auter-0.11-5.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving ckeditor-4.9.2-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving dar-2.5.15-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving dehydrated-0.6.2-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving drupal7-7.59-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving hamlib-3.2-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving jpegoptim-1.4.6-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving knot-resolver-2.3.0-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving libnfs-1.11.0-1.fc26 from f26-updates-testing to None
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving magic-8.1.211-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving nfdump-1.6.17-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving nodejs-6.14.2-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving pag-0.8-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving perl-bareword-filehandles-0.006-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving perl-multidimensional-0.014-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving php-paragonie-random-compat-2.0.12-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving php-simplesamlphp-saml2_3-3.1.5-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving python-bitcoinlib-0.10.1-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving python-neomodel-3.2.8-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving redhat-rpm-config-66-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving rtorrent-0.9.6-11.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving rubygem-cairo-1.15.13-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving rubygem-domain_name-0.5.20180417-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving variety-0.6.8-2.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving verbiste-0.1.45-1.fc26 from f26-updates-testing to f26-updates
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers    INFO]f26-updates Moving vim-8.0.1788-1.fc26 from f26-updates-testing to None
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: [2018-05-09 14:35:39][fedmsg.consumers   ERROR]f26-updates Exception in ComposerThread(f26-updates)
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: Traceback (most recent call last):
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:   File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 437, in work
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:     self.determine_and_perform_tag_actions()
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:   File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 69, in wrapper
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:     retval = method(self, *args, **kwargs)
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:   File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 590, in determine_and_perform_tag_actions
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:     self._perform_tag_actions()
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:   File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 652, in _perform_tag_actions
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]:     failed_tasks = buildsys.wait_for_tasks([task[0] for task in results],
May 09 14:35:39 bodhi-backend01.phx2.fedoraproject.org fedmsg-hub[57207]: KeyError: 0

Uh oh. Each of those builds was tagged over and then the compose crashed. I hand-copied each of the builds that Bodhi logged as moving from f26-updates-testing to f26-updates into the first command's bash for loop above.

The second bash for loop was a bit trickier to form, as I didn't want to find out by hand which builds were part of the same update, so I used a crazy bash thing:

echo $(for b in {R-commonmark-1.5-1.fc26,R-reticulate-1.7-1.fc26,adapta-gtk-theme-3.93.1.1-1.fc26,auter-0.11-5.fc26,ckeditor-4.9.2-1.fc26,dar-2.5.15-1.fc26,dehydrated-0.6.2-1.fc26,drupal7-7.59-1.fc26,hamlib-3.2-1.fc26,jpegoptim-1.4.6-1.fc26,knot-resolver-2.3.0-1.fc26,libnfs-1.11.0-1.fc26,magic-8.1.211-1.fc26,nfdump-1.6.17-1.fc26,nodejs-6.14.2-1.fc26,pag-0.8-1.fc26,perl-bareword-filehandles-0.006-1.fc26,perl-multidimensional-0.014-1.fc26,php-paragonie-random-compat-2.0.12-1.fc26,php-simplesamlphp-saml2_3-3.1.5-1.fc26,python-bitcoinlib-0.10.1-1.fc26,python-neomodel-3.2.8-1.fc26,redhat-rpm-config-66-1.fc26,rtorrent-0.9.6-11.fc26,rubygem-cairo-1.15.13-1.fc26,rubygem-domain_name-0.5.20180417-1.fc26,variety-0.6.8-2.fc26,verbiste-0.1.45-1.fc26,vim-8.0.1788-1.fc26}; do bodhi updates query --builds $b; done;) | sed "s/ /\n/g" | grep bodhi.fedoraproject.org | sort | uniq | sed "s=https://bodhi.fedoraproject.org/updates/==" | tr '\n' ,

To explain that a bit - I'm looping over the same builds and running the Bodhi CLI to query each of them. I then need to replace spaces with newlines so I can use grep to filter out just the URLs for those updates. After I have the URLs, I sort them and filter them for uniqueness. Then I use sed to get rid of the beginning of the URL, leaving only the update aliases, and finally I replace the newlines with commas so it's easy to paste into another bash for loop.

I will be opening a similar second ticket for the other release that has this problem shortly.


I chatted with @kevin and @puiterwijk about this and came to the position that we should not do it this way:

<nirik> bowlofeggs: I don't think we need to move any builds, we need to update those updates as having gone out?
<bowlofeggs> nirik: i guess it's possible that i could update the updates to reflect reality - i'm not 100% sure which way would be better
<nirik> bowlofeggs: oh, you mean untag them from updates and let them go out again?
<nirik> thats.... not a good idea IMHO.
<nirik> people have already installed them by now.
<nirik> if they disappear and say the bodhi update never goes stable... they are left with... something wrong.
<bowlofeggs> nirik: yeah that does seem bad
<nirik> so IMHO it would be better if we could just get those updates in bodhi to reflect that they are stable now.
<bowlofeggs> puiterwijk: do you agree with nirik, that it'd be better if i just make bodhi's db be consistent with reality here?
<bowlofeggs> i think i'm becoming convinced
<puiterwijk> bowlofeggs: if they are tagged into the $distro-updates tag, absolutely
<bowlofeggs> ok
<puiterwijk> If they've gone out, then that is their status, and bodhi needs to admit that.
<puiterwijk> Only if they got untagged from the -updates tag (and thus are in limbo), do we want bodhi to repush
<bowlofeggs> ok
<bowlofeggs> i will try to come up with a reasonably way to do that
<bowlofeggs> i feel like it might not necessarily be best to just change their status, because we probably want it to also process bugs and whatever other things happen in the compose
<nirik> bowlofeggs: perhaps request stable and for one push disable the tag check or add fN-stable as a valid tag, then set it back?

Metadata Update from @bowlofeggs:
- Issue assigned to bowlofeggs

2 years ago

I have spent time this morning crafting a script to fix these updates. It tries to reproduce the steps that the composer would have performed on them if the compose had not crashed:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/python2
from datetime import datetime

from bodhi.server import bugs, buildsys, config, initialize_db, models, setup_buildsys


bugs.set_bugtracker()
initialize_db(config.config)
setup_buildsys()

updates = ['FEDORA-2018-01a32ee53c', 'FEDORA-2018-03418b6945', 'FEDORA-2018-06b21886b7', 'FEDORA-2018-0c0671072b', 'FEDORA-2018-1193cf510f', 'FEDORA-2018-1361f39801', 'FEDORA-2018-1a09212f21', 'FEDORA-2018-1cd5503c53', 'FEDORA-2018-2359c2ae0e', 'FEDORA-2018-3b8ba12b38', 'FEDORA-2018-3cfb5c5fa9', 'FEDORA-2018-4431aaaba7', 'FEDORA-2018-482a72b631', 'FEDORA-2018-531bf59956', 'FEDORA-2018-5a3b5b1278', 'FEDORA-2018-657ddaaaac', 'FEDORA-2018-6a8ba25ddd', 'FEDORA-2018-6d82adbfeb', 'FEDORA-2018-6dde187524', 'FEDORA-2018-6fb1f8ac3b', 'FEDORA-2018-9dc3a15a3a', 'FEDORA-2018-c4f0b23dd9', 'FEDORA-2018-ca51131132', 'FEDORA-2018-ce53a35ab0', 'FEDORA-2018-e07b31dddd', 'FEDORA-2018-e61a47794d', 'FEDORA-2018-f150cc029d', 'FEDORA-2018-f170e6da05', 'FEDORA-2018-f2a64848c9', 'FEDORA-2018-02ed6f09f3', 'FEDORA-2018-096049e5a3', 'FEDORA-2018-0a7855714a', 'FEDORA-2018-0efbc823e5', 'FEDORA-2018-0f9b88403a', 'FEDORA-2018-129dda555b', 'FEDORA-2018-1339401912', 'FEDORA-2018-1ba93b3144', 'FEDORA-2018-21a62db99d', 'FEDORA-2018-22f480393e', 'FEDORA-2018-282d552b92', 'FEDORA-2018-2972cf930b', 'FEDORA-2018-2ad243daf9', 'FEDORA-2018-32f73beece', 'FEDORA-2018-343020286a', 'FEDORA-2018-39a6ec53c4', 'FEDORA-2018-3d8664b58a', 'FEDORA-2018-4569d4b0a3', 'FEDORA-2018-47769aedb2', 'FEDORA-2018-4ca1dc9301', 'FEDORA-2018-52f4abbfed', 'FEDORA-2018-59eb033684', 'FEDORA-2018-5eb5277f7d', 'FEDORA-2018-6bd87ab4e9', 'FEDORA-2018-77d8532301', 'FEDORA-2018-799dbb8de1', 'FEDORA-2018-7c32281b26', 'FEDORA-2018-82a10ae8fc', 'FEDORA-2018-93876457a2', 'FEDORA-2018-94173a387f', 'FEDORA-2018-a120d509ab', 'FEDORA-2018-a13691074b', 'FEDORA-2018-a166a71a3b', 'FEDORA-2018-b5857d400a', 'FEDORA-2018-b9ad458866', 'FEDORA-2018-bab65abf10', 'FEDORA-2018-be9d477b33', 'FEDORA-2018-beab17c147', 'FEDORA-2018-bfc9a2cc7c', 'FEDORA-2018-c642cc0df1', 'FEDORA-2018-ced4c1a36c', 'FEDORA-2018-d4f03af3a6', 'FEDORA-2018-d8511ad131', 'FEDORA-2018-e29c7d10da', 'FEDORA-2018-f49cbe8cf1']


for update in updates:
    print(update)
    update = models.Update.query.filter_by(alias=update).one()

    print('checking tags')
    problem = False
    for b in update.builds:
        tags = b.get_tags()
        print(tags)
        if 'f26-updates' in tags or 'f27-updates' in tags:
            if update.status == models.UpdateStatus.testing:
                problem = True
    if not problem:
        print('This update is OK')

    print('update_security_bugs()')
    if update.type is models.UpdateType.security:
        for bug in update.bugs:
            bug.update_details()

    print('expire_buildroot_overrides()')
    for build in update.builds:
        if build.override:
            try:
                build.override.expire()
            except Exception as e:
                print('Could not expire override: ' + str(e))

    print('remove_pending_tags()')
    koji = buildsys.get_session()
    koji.multicall = True
    update.remove_tag(update.release.pending_stable_tag, koji=koji)
    result = koji.multiCall()
    print('remove_pending_tags koji.multiCall result = ' + str(result))

    print('_mark_status_changes()')
    now = datetime.utcnow()
    update.status = models.UpdateStatus.stable
    update.date_stable = now
    update.date_pushed = now
    update.pushed = True

    print('comment on update that i fixed it')
    update.comment(models.Session(), 'This update has been marked stable administratively. See https://pagure.io/fedora-infrastructure/issue/6925', author='bowlofeggs')

    print('modify_bugs()')
    update.modify_bugs()

    print('status_comments()')
    update.status_comment(models.Session())

    print('send_stable_announcements()')
    update.send_update_notice()

    print('_unlock_updates()')
    update.request = None
    update.locked = False

    print('obsolete_older_updates()')
    update.obsolete_older_updates(models.Session())

    models.Session().commit()

I'm making a modification to the above. Rather than check if the update is in testing, I am checking that the update is not stable (in the case that the update is pending):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/python2
from datetime import datetime

from bodhi.server import bugs, buildsys, config, initialize_db, models, setup_buildsys


bugs.set_bugtracker()
initialize_db(config.config)
setup_buildsys()

updates = ['FEDORA-2018-01a32ee53c', 'FEDORA-2018-03418b6945', 'FEDORA-2018-06b21886b7', 'FEDORA-2018-0c0671072b', 'FEDORA-2018-1193cf510f', 'FEDORA-2018-1361f39801', 'FEDORA-2018-1a09212f21', 'FEDORA-2018-1cd5503c53', 'FEDORA-2018-2359c2ae0e', 'FEDORA-2018-3b8ba12b38', 'FEDORA-2018-3cfb5c5fa9', 'FEDORA-2018-4431aaaba7', 'FEDORA-2018-482a72b631', 'FEDORA-2018-531bf59956', 'FEDORA-2018-5a3b5b1278', 'FEDORA-2018-657ddaaaac', 'FEDORA-2018-6a8ba25ddd', 'FEDORA-2018-6d82adbfeb', 'FEDORA-2018-6dde187524', 'FEDORA-2018-6fb1f8ac3b', 'FEDORA-2018-9dc3a15a3a', 'FEDORA-2018-c4f0b23dd9', 'FEDORA-2018-ca51131132', 'FEDORA-2018-ce53a35ab0', 'FEDORA-2018-e07b31dddd', 'FEDORA-2018-e61a47794d', 'FEDORA-2018-f150cc029d', 'FEDORA-2018-f170e6da05', 'FEDORA-2018-f2a64848c9', 'FEDORA-2018-02ed6f09f3', 'FEDORA-2018-096049e5a3', 'FEDORA-2018-0a7855714a', 'FEDORA-2018-0efbc823e5', 'FEDORA-2018-0f9b88403a', 'FEDORA-2018-129dda555b', 'FEDORA-2018-1339401912', 'FEDORA-2018-1ba93b3144', 'FEDORA-2018-21a62db99d', 'FEDORA-2018-22f480393e', 'FEDORA-2018-282d552b92', 'FEDORA-2018-2972cf930b', 'FEDORA-2018-2ad243daf9', 'FEDORA-2018-32f73beece', 'FEDORA-2018-343020286a', 'FEDORA-2018-39a6ec53c4', 'FEDORA-2018-3d8664b58a', 'FEDORA-2018-4569d4b0a3', 'FEDORA-2018-47769aedb2', 'FEDORA-2018-4ca1dc9301', 'FEDORA-2018-52f4abbfed', 'FEDORA-2018-59eb033684', 'FEDORA-2018-5eb5277f7d', 'FEDORA-2018-6bd87ab4e9', 'FEDORA-2018-77d8532301', 'FEDORA-2018-799dbb8de1', 'FEDORA-2018-7c32281b26', 'FEDORA-2018-82a10ae8fc', 'FEDORA-2018-93876457a2', 'FEDORA-2018-94173a387f', 'FEDORA-2018-a120d509ab', 'FEDORA-2018-a13691074b', 'FEDORA-2018-a166a71a3b', 'FEDORA-2018-b5857d400a', 'FEDORA-2018-b9ad458866', 'FEDORA-2018-bab65abf10', 'FEDORA-2018-be9d477b33', 'FEDORA-2018-beab17c147', 'FEDORA-2018-bfc9a2cc7c', 'FEDORA-2018-c642cc0df1', 'FEDORA-2018-ced4c1a36c', 'FEDORA-2018-d4f03af3a6', 'FEDORA-2018-d8511ad131', 'FEDORA-2018-e29c7d10da', 'FEDORA-2018-f49cbe8cf1']


for update in updates:
    print(update)
    update = models.Update.query.filter_by(alias=update).one()

    print('checking tags')
    problem = False
    for b in update.builds:
        tags = b.get_tags()
        print(tags)
        if 'f26-updates' in tags or 'f27-updates' in tags:
            if update.status != models.UpdateStatus.stable:
                problem = True
    if not problem:
        print('This update is OK')

    print('update_security_bugs()')
    if update.type is models.UpdateType.security:
        for bug in update.bugs:
            bug.update_details()

    print('expire_buildroot_overrides()')
    for build in update.builds:
        if build.override:
            try:
                build.override.expire()
            except Exception as e:
                print('Could not expire override: ' + str(e))

    print('remove_pending_tags()')
    koji = buildsys.get_session()
    koji.multicall = True
    update.remove_tag(update.release.pending_stable_tag, koji=koji)
    result = koji.multiCall()
    print('remove_pending_tags koji.multiCall result = ' + str(result))

    print('_mark_status_changes()')
    now = datetime.utcnow()
    update.status = models.UpdateStatus.stable
    update.date_stable = now
    update.date_pushed = now
    update.pushed = True

    print('comment on update that i fixed it')
    update.comment(models.Session(), 'This update has been marked stable administratively. See https://pagure.io/fedora-infrastructure/issue/6925', author='bowlofeggs')

    print('modify_bugs()')
    update.modify_bugs()

    print('status_comments()')
    update.status_comment(models.Session())

    print('send_stable_announcements()')
    update.send_update_notice()

    print('_unlock_updates()')
    update.request = None
    update.locked = False

    print('obsolete_older_updates()')
    update.obsolete_older_updates(models.Session())

    models.Session().commit()

I have run the script and I have spot checked a few of the updates it touched. I believe the issue is now resolved. If anyone knows of a problem please do let me know.

Metadata Update from @bowlofeggs:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata