From 0aa9aa26b582a21cf28a5f4463d2552454ac3a89 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 21 Jul 2016 13:27:39 +0200 Subject: [PATCH 1/5] Document bus message format Signed-off-by: Nils Philippsen --- README.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6ceb3ed2..163364a4 100644 --- a/README.rst +++ b/README.rst @@ -132,8 +132,8 @@ Possible response codes are for various requests include: implemented yet. - HTTP 503 Service Unavailable - The service is down, possibly for maintanance. -Module Build States -------------------- +_`Module Build States` +---------------------- You can see the list of possible states with:: @@ -182,3 +182,47 @@ ready This is a state to be set when a module is ready to be part of a larger compose. perhaps it is set by an external service that knows about the Grand Plan. + +Bus messages +============ + +Message Topic +------------- + +The suffix for message topics concerning changes in module state is +``module.state.change``. Currently, it is expected that these messages are sent +from koji or ridad, i.e. the topic is prefixed with ``*.buildsys.`` or +``*.ridad.``, respectively. + +Message Body +------------ + +The message body (``msg['msg']``) is a dictionary with these fields: + +``state`` +~~~~~~~~~ + +This is the current state of the module, corresponding with the states +described above in `Module Build States`_. + +``variant_type`` +~~~~~~~~~~~~~~~~ + +Modules are a type of 'Variant' in PDC, this should be set to ``module``. + +``variant_name``, ``variant_version``, ``variant_release`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Name, version and release of the module. + +``scmurl`` +~~~~~~~~~~ + +Specifies the exact repository state from which a module is built. + +E.g. ``"scmurl": "git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#020ea37251df5019fde9e7899d2f7d7a987dfbf5"`` + +``koji_tag`` +~~~~~~~~~~~~ + +Specifies against which branch a module is built. From e4b118b023fa4dac928026d0c16391d55db4d961 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Jul 2016 12:07:07 +0200 Subject: [PATCH 2/5] Drop 'variant_type' from the message. The message is only about modules, therefore the variant type is 'module'. No need to communicate this redundantly. Signed-off-by: Nils Philippsen --- README.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.rst b/README.rst index 163364a4..9b498ee5 100644 --- a/README.rst +++ b/README.rst @@ -205,11 +205,6 @@ The message body (``msg['msg']``) is a dictionary with these fields: This is the current state of the module, corresponding with the states described above in `Module Build States`_. -``variant_type`` -~~~~~~~~~~~~~~~~ - -Modules are a type of 'Variant' in PDC, this should be set to ``module``. - ``variant_name``, ``variant_version``, ``variant_release`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f67d1f285b937b8231528dacc59124b2095152a7 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Jul 2016 12:09:25 +0200 Subject: [PATCH 3/5] Drop 'variant_' prefix from message fields. Signed-off-by: Nils Philippsen --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 9b498ee5..7d10e7f6 100644 --- a/README.rst +++ b/README.rst @@ -205,8 +205,8 @@ The message body (``msg['msg']``) is a dictionary with these fields: This is the current state of the module, corresponding with the states described above in `Module Build States`_. -``variant_name``, ``variant_version``, ``variant_release`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``name``, ``version``, ``release`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Name, version and release of the module. From 9629b65b18e8644a544db5ae2c8c5394411b6c94 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Jul 2016 12:10:14 +0200 Subject: [PATCH 4/5] Drop 'koji_tag' field from message. The koji tag should be set by pdc-updater when first encountering a module n-v-r, and be stored in PDC. Signed-off-by: Nils Philippsen --- README.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.rst b/README.rst index 7d10e7f6..da31a119 100644 --- a/README.rst +++ b/README.rst @@ -216,8 +216,3 @@ Name, version and release of the module. Specifies the exact repository state from which a module is built. E.g. ``"scmurl": "git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#020ea37251df5019fde9e7899d2f7d7a987dfbf5"`` - -``koji_tag`` -~~~~~~~~~~~~ - -Specifies against which branch a module is built. From bc208a5e03959ebdf86d5976fba1f86174d43390 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Jul 2016 12:15:05 +0200 Subject: [PATCH 5/5] Document 'topdir' message field. Signed-off-by: Nils Philippsen --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index da31a119..2f7c33cf 100644 --- a/README.rst +++ b/README.rst @@ -216,3 +216,10 @@ Name, version and release of the module. Specifies the exact repository state from which a module is built. E.g. ``"scmurl": "git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#020ea37251df5019fde9e7899d2f7d7a987dfbf5"`` + +``topdir`` +~~~~~~~~~~ + +The toplevel directory containing the trees for each architecture of a module. +This field is only present when a module finished building, i.e. with the +states 'done' or 'ready'.