#90 Filter out 'unpushed' updates along with 'obsolete' and 'deleted'
Merged 5 years ago by frantisekz. Opened 5 years ago by adamwill.
fedora-qa/ adamwill/blockerbugs requests-no-unpushed  into  develop

file modified
+5 -1
@@ -129,7 +129,11 @@ 

  def updatelabel(bug):

      from .models.update import Update

      label = []

-     lowest_status_update = bug.updates.filter(Update.status != 'obsolete', Update.status != 'deleted').first()

+     lowest_status_update = bug.updates.filter(

+         Update.status != 'obsolete',

+         Update.status != 'deleted',

+         Update.status != 'unpushed'

+     ).first()

      if lowest_status_update:

          if lowest_status_update.status == 'stable':

              if bug.status in ['MODIFIED', 'ON_QA', 'VERIFIED', 'CLOSED']:

@@ -128,7 +128,7 @@ 

      """

      m_alias = db.aliased(Milestone)

      updates = Update.query.join(m_alias, Update.milestones).filter(

-         m_alias.id == milestone.id, ~Update.status.in_(['obsolete', 'deleted']),

+         m_alias.id == milestone.id, ~Update.status.in_(['obsolete', 'deleted', 'unpushed']),

          or_(Update.status != 'stable', Update.pending == True),

          Update.bugs.any(

              or_(Bug.accepted_blocker == True, Bug.accepted_0day == True,
@@ -142,7 +142,7 @@ 

      """

      m_alias = db.aliased(Milestone)

      updates = Update.query.join(m_alias, Update.milestones).filter(

-         m_alias.id == milestone.id,  ~Update.status.in_(['obsolete', 'deleted']),

+         m_alias.id == milestone.id,  ~Update.status.in_(['obsolete', 'deleted', 'unpushed']),

          or_(Update.status != 'stable', Update.pending == True),

          Update.bugs.any(Bug.accepted_fe == True)).all()

      return updates
@@ -208,7 +208,11 @@ 

      if not bug:

          abort(404)

      packagename = bug.component

-     updates = bug.updates.filter(Update.status != 'obsolete', Update.status != 'deleted').all()

+     updates = bug.updates.filter(

+         Update.status != 'obsolete',

+         Update.status != 'deleted',

+         Update.status != 'unpushed'

+     ).all()

      return render_template('bug_tooltip.html', packagename=packagename, updates=updates)

  

  

There are several places where we ignore updates that are
obsolete or deleted. In all of these places we should similarly
ignore updates that are 'unpushed' - in modern Bodhi this is
roughly the equivalent of 'deleted', you can't really delete an
update any more, if it's really bad and you want it to go away
you 'unpush' it. This should solve the problem of the unpushed
update FEDORA-2019-be95719373 showing up in Fedora 31 candidate
compose requests.

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

Pull-Request has been merged by frantisekz

5 years ago