Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
Update docs with procol version and failure
Michalis Zampetakis committed 2 years ago
commit e342d614cbe4f0dffa4976e60ef8eaf927a05774
parent db73047f4815deb6a9ccf6c88b8b6cdaa9ad76c2
1 file changed +7 -3
modified doc/architecture.md
@@ -129,7 +129,7 @@ code.
~~~{.sh .numberLines}
$ cargo run -q --bin broker-messages
Trigger request:
-
{"request":"trigger","event_type":"push","repository":{"id":"rad:zwTxygwuz5LDGBq255RA2CbNGrz8","name":"radicle-ci-broker","description":"Radicle CI broker","private":false,"default_branch":"main","delegates":["did:key:z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV"]},"pusher":{"id":"did:key:z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV","alias":"liw"},"before":"b4fb1e347be7db19f0859717062f94116b5bec9f","after":"b4fb1e347be7db19f0859717062f94116b5bec9f","branch":"patches/8d8232ddcb217fa1402eec4d955e227ef3bb5881","commits":[]}
+
{"request":"trigger","event_type":"push","version":<PROTOCOL_VERSION>,repository":{"id":"rad:zwTxygwuz5LDGBq255RA2CbNGrz8","name":"radicle-ci-broker","description":"Radicle CI broker","private":false,"default_branch":"main","delegates":["did:key:z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV"]},"pusher":{"id":"did:key:z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV","alias":"liw"},"before":"b4fb1e347be7db19f0859717062f94116b5bec9f","after":"b4fb1e347be7db19f0859717062f94116b5bec9f","branch":"patches/8d8232ddcb217fa1402eec4d955e227ef3bb5881","commits":[]}

Triggered response:
{"response":"triggered","run_id":{"id":"any-string-works-as-run-id"}}
@@ -141,7 +141,7 @@ Failure response:
{"response":"finished","result":"failure"}

Error response:
-
{"response":"finished","result":{"error":"error message\nsecond line"}}
+
{"response":"finished","failure":"error message\nsecond line"}
~~~

## Push Event Request
@@ -152,6 +152,7 @@ An example request that the broker sends looks like this:
{
    "request": "trigger",
    "event_type": "push",
+
    "version":<PROTOCOL_VERSION>,
    "pusher": {
        "id": "did:key:z6MkltRpzcq2ybm13yQpyre58JUeMvZY6toxoZVpLZ8YabRa",
        "alias": "node_alias"
@@ -180,6 +181,7 @@ An example request that the broker sends looks like this:

where:

+
  - `<PROTOCOL_VERSION>` is the version of the protocol messages that broker exchanges
  - `<RID>` is the repository ID, in its `rad:` URN format,
  - `<BRANCH_NAME>` is the branch name where the push occurred,
  - `<AFTER_COMMIT>` is the commit id of the last commit being pushed,
@@ -197,6 +199,7 @@ An example request that the broker sends looks like this:
{
    "request": "trigger",
    "event_type": "patch",
+
    "version":<PROTOCOL_VERSION>
    "action": "created|updated",
    "patch": {
        "id": "<PATCH_ID>",
@@ -261,7 +264,8 @@ An example request that the broker sends looks like this:

where:

-
  - `<RID>` is the reposiatory ID, in its `rad:` URN format,
+
  - `<PROTOCOL_VERSION>` is the version of the protocol messages that broker exchanges
+
  - `<RID>` is the repository ID, in its `rad:` URN format,
  - `<AFTER_COMMIT>` is the commit id of the last commit being pushed,
  - `<BEFORE_COMMIT>` is the commit id of the **parent** of the first
    commit being pushed (i.e. ` <SOME_OTHER_COMMIT_BEING_PUSHED>`),