cosalib/messaging: add some documentation strings
I'd like this library file to also serve as a reference of all the
messages we emit. Let's detail everything we support so far and what
uses them and for what purpose.
@@ -32,6 +32,9 @@ FEDORA_MESSAGING_COREOS_TOPIC_PREFIX = {
'stg': 'org.fedoraproject.stg.coreos',
}
+# You can look at examples of recent fedmsgs for particular topics via
+# datagrepper, e.g.:
+#
# https://apps.fedoraproject.org/datagrepper/raw?topic=org.fedoraproject.prod.coreos.build.request.ostree-sign&delta=100000
# https://apps.fedoraproject.org/datagrepper/raw?topic=org.fedoraproject.prod.coreos.build.request.artifacts-sign&delta=100000
@@ -39,6 +42,13 @@ FEDORA_MESSAGING_COREOS_TOPIC_PREFIX = {
DEFAULT_REQUEST_TIMEOUT_SEC = 60
+# This is used for requesting other services to perform specific actions. The
+# function does not return until the service replies (or we time out).
+# Supported request types:
+# - ostree-sign: sent by build pipeline to sign OSTree commits
+# - artifacts-sign: sent by build pipeline to sign images
+# - ostree-import: sent by release pipeline to import OSTree commits into the
+# canonical Fedora repos
def send_request_and_wait_for_response(request_type,
config=None,
environment='prod',
