Skip to content

Commit

Permalink
models: Don't reset the pushed and date_pushed flags upon request.
Browse files Browse the repository at this point in the history
If a testing update gets a request for stable, currently it will nullify the
`pushed` and `date_pushed` fields. I don't see any reason why we shouldn't keep
these intact, especially considering the fact that we now have `date_stable` and
`date_testing` timestamps. Also, with `date_pushed` set to None, the
`<issued/>` tag in the updateinfo.xml will be omitted, which can lead to other
problems (see
issue #718).
  • Loading branch information
lmacken committed Dec 2, 2015
1 parent 76b07fd commit 9d8d79a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions bodhi/metadata.py
Expand Up @@ -206,6 +206,7 @@ def add_update(self, update):
rec.rights = config.get('updateinfo_rights')

if update.date_pushed:
log.warning('No date_pushed set for %s' % update.title)
rec.issued_date = update.date_pushed
if update.date_modified:
rec.updated_date = update.date_modified
Expand Down
4 changes: 0 additions & 4 deletions bodhi/models/models.py
Expand Up @@ -1112,7 +1112,6 @@ def set_request(self, db, action, username):
self.add_tag(self.release.candidate_tag)

self.request = action
self.pushed = False

notes = notes and '. '.join(notes) + '.' or ''
flash_notes = flash_notes and '. %s' % flash_notes
Expand All @@ -1123,9 +1122,6 @@ def set_request(self, db, action, username):
topic = u'update.request.%s' % action
notifications.publish(topic=topic, msg=dict(update=self, agent=username))

# FIXME: track date pushed to testing & stable in different fields
self.date_pushed = None

def add_tag(self, tag):
""" Add a koji tag to all builds in this update """
log.debug('Adding tag %s to %s' % (tag, self.title))
Expand Down

0 comments on commit 9d8d79a

Please sign in to comment.