#118 Look for Flatpak and module updates as well as RPM updates
Merged 4 years ago by adamwill. Opened 4 years ago by adamwill.
fedora-qa/ adamwill/blockerbugs modules-flatpaks  into  develop

@@ -116,7 +116,7 @@ 

      def search_updates(self, bugids, release_num):

          queries_data = dict(

                  bugs=[str(bug_id) for bug_id in bugids],

-                 release='f%d' % release_num,

+                 release=['f%d' % release_num, 'f%df' % release_num, 'f%dm' % release_num],

                  limit=100,

          )

          try:

@@ -50,12 +50,21 @@ 

                     title=u"anaconda can't report traceback to bugzilla")],

  })

  

+ update3_for_bug_3100 = copy(base_update)

+ update3_for_bug_3100.update({

+     'title': u'flatpak-runtime-f32-3220200414150125.1 and flatpak-sdk-f32-3220200414150125.1',

+     'bugs': [Munch(bug_id=3100, parent=False, security=False,

+                    title=u"Update F32 flatpak runtime to include gtk3-3.24.18-1.fc32")],

+     'updateid': "FEDORA-FLATPAK-2020-fc73fa3e9d",

+ })

+ 

  

  class FakeBodhiInterface(object):

      updates = {

          ('f99', '2000'): [update_for_bugs_2000_2001],

          ('f99', '2001'): [update_for_bugs_2000_2001],

          ('f99', '3000'): [update1_for_bug_3000, update2_for_bug_3000],

+         ('f99f', '3100'): [update3_for_bug_3100],

          ('f99', '4000'): [],

      }

  
@@ -66,7 +75,7 @@ 

      }

  

      def query(self, release=None, bugs=None, **kwargs):

-         updates = list(chain(*(self.updates[(release, bug)] for bug in bugs)))

+         updates = list(chain(*(self.updates.get((rel, bug), []) for bug in bugs for rel in release)))

          return Munch(updates=updates,

                       page=1,

                       pages=1,
@@ -162,6 +171,17 @@ 

          bugs_id = set(bug.bugid for update in updates for bug in update.bugs)

          assert bugs_id == set((bug1.bugid, bug2.bugid, bug3.bugid))

  

+     def test_sync_flatpak_updates(self):

+         bug1 = add_bug(3100, 'testbug1', self.test_milestone99alpha)

+         self.update_sync.sync_updates(self.test_release99)

+         updates = Update.query.all()

+         assert len(updates) == 1

+         update = updates[0]

+         assert len(update.bugs) == 1  # second bug not in db

+         assert update.bugs[0].bugid == bug1.bugid

+         assert update.status == u'testing'

+         assert update.pending

+ 

      def test_no_updates_for_bug(self):

          bug1 = add_bug(4000, 'testbug1', self.test_milestone99alpha)

          self.update_sync.sync_updates(self.test_release99)

There may be Flatpak or module updates that address blocker or
FE bugs, as well as RPM updates (in fact there are two right
now). To Bodhi, these are separate "releases", so we need to
tweak the search dict to search for bugs in those releases too.

Signed-off-by: Adam Williamson awilliam@redhat.com

rebased onto 429a9d5

4 years ago

rebased onto e0716f8

4 years ago

Looks reasonable. I didn't test it. If you did, feel free to merge :-)

I did, yes, my local instance is using it already.

Pull-Request has been merged by adamwill

4 years ago