Skip to content

Commit

Permalink
Merge pull request #483 from lubomir/pungi-terminated
Browse files Browse the repository at this point in the history
Handle Pungi compose being terminated
  • Loading branch information
pypingou committed Oct 8, 2018
2 parents 444ccfa + e9522e7 commit 292df41
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions fedmsg_meta_fedora_infrastructure/compose2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def subtitle(self, msg, **config):
'STARTED': self._('started'),
'FINISHED': self._('just finished'),
'DOOMED': self._('failed in a horrible fire'),
'TERMINATED': self._('was terminated'),
}
status = statuses.get(msg['msg']['status'], msg['msg']['status'])
tmpl = self._("pungi-koji compose of {compose} {status}")
Expand Down
26 changes: 26 additions & 0 deletions fedmsg_meta_fedora_infrastructure/tests/compose2.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,32 @@ class TestPungiKojiComplete(Base):
}


class TestPungiKojiTerminated(Base):
""" In 2016, the `release engineering
<https://fedoraproject.org/wiki/ReleaseEngineering>`_ team started moving
the compose process to ``pungi4``, which emits messages like this as it
does its composition work.
Here's an example message published when a compose processed is killed.
"""
expected_title = "pungi.compose.status.change"
expected_subti = "pungi-koji compose of Fedora-24-20151208.n.7 was terminated"
expected_link = "http://kojipkgs.fedoraproject.org/" + \
"compose//rawhide/Fedora-24-20151208.n.7"
expected_icon = "https://apps.fedoraproject.org/img/icons/pungi.png"
expected_objects = set(['rawhide/Fedora-24-20151208/n/7'])
msg = {
"msg": {
"compose_id": "Fedora-24-20151208.n.7",
"location": "http://kojipkgs.fedoraproject.org/compose/"
"/rawhide/Fedora-24-20151208.n.7/compose",
"status": "TERMINATED"
},
"timestamp": 1449600728.0,
"topic": "org.fedoraproject.prod.pungi.compose.status.change"
}


class TestPungiPhaseStart(Base):
""" In 2016, the `release engineering
<https://fedoraproject.org/wiki/ReleaseEngineering>`_ team started moving
Expand Down

0 comments on commit 292df41

Please sign in to comment.