diff --git a/ci-broker.md b/ci-broker.md index 8ab8eec9..e3000bc8 100644 --- a/ci-broker.md +++ b/ci-broker.md @@ -8,6 +8,25 @@ be acceptable to its stakeholders. This file is used by [Subplot](https://subplot.tech/) to generate and run test code as part of running `cargo test`. +# Stakeholders + +For the purposes of this document, a stakeholder is someone whose +opinion matters for setting acceptance criteria. The CI broker has the +following stakeholders, grouped so that specific people only need to +be named in one place: + +* `cib-devs` – the people who develop the CI broker itself + - Lars Wirzenius +* `adapter-devs` – the people who develop adapters + - Lars Wirzenius + - Michalis + - Yorgos Saslis + +Some stakeholders are named explicitly so that it will be easier to +ask them more information that is captured in this document. Note that +the list will evolve over time. Please suggest missing stakeholders to +the developers and maintainers of the CI broker. + # Data files shared between scenarios ## Broker configuration @@ -182,7 +201,7 @@ at run time as JSON. _Why:_ This is helpful for the node operator to verify that they have configured the program correctly. -_Who:_ Lars +_Who:_ `cib-devs` Our verification here is quite simplistic, and only checks that the output is in the JSON format. It does not try to make sure the JSON @@ -204,7 +223,7 @@ _Want:_ CI broker can run its adapter. _Why:_ This is obviously necessary. If this doesn't work, nothing else has a hope of working. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -242,7 +261,7 @@ _Want:_ `cib` and `cibtool` report their version, if invoked with the _Why:_ This helps node operators include the version in any bug reports. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -272,7 +291,7 @@ provide: it need not be the run log. It might, for example, be a URL to the web view of a "pipeline" in GitLab CI instead, from which the user can access individual logs. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -312,7 +331,7 @@ understand the problem. _Why:_ This helps users deal with problems themselves and reduces the support burden on the Radicle project. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -336,7 +355,7 @@ to the user. _Why:_ This helps users deal with problems themselves and reduces the support burden on the Radicle project. -_Who:_ Lars. +_Who:_ `cib-devs` _Comment:_ This is a very basic scenario. Error handling is by nature a thing that can always be made better. We can later add more @@ -370,7 +389,7 @@ re-connect, or it can terminate. Either is workable. However, it's a simpler design and less code to terminate and allow re-starting to be handled by a dedicated system, such as `systemd`. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -394,7 +413,7 @@ cleanly, and it doesn't result in an error. _Why:_ In the integration test suite, we need to start and stop the CI broker many times. We need to easily detect errors. -_Who:_ Lars. +_Who:_ `cib-devs` We use a special magic fake node event to signal shutdown: a `RefsFetched` event with a skipped update for a ref "`shutdown`" and @@ -425,7 +444,7 @@ of all CI runs a CI broker instance has performed. _Why:_ This is useful for diagnosis, if nothing else. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -459,7 +478,7 @@ successfully. _Why:_ Test scenarios using the dummy adapter need to be able to rely that it works. -_Who:_ Lars +_Who:_ `cib-devs` ~~~scenario given file dummy.sh @@ -476,7 +495,7 @@ _Want:_ The adapter with a URL (in embedded file _Why:_ Test scenarios using this adapter need to be able to rely that it works. -_Who:_ Lars +_Who:_ `cib-devs` ~~~scenario given file adapter-with-url.sh @@ -493,7 +512,7 @@ terminates after the first connection. _Why:_ This is needed so that it can be invoked in Subplot scenarios. -_Who:_ Lars. +_Who:_ `cib-devs` The following scenario may only work on Linux, as it's using `pgrep` and `nc` and those may not be portable. If so, this may need to be @@ -542,7 +561,7 @@ correctly. _Why:_ If this doesn't work with a single process, it won't work of multiple processes, either. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given an installed cibtool @@ -564,7 +583,7 @@ event filter. _Why:_ This is fundamental for running CI when repositories in a node change. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -593,7 +612,7 @@ _Want:_ Insert many events that arrive quickly. _Why:_ We need at least some rudimentary performance testing. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -623,7 +642,7 @@ then the CI broker's filter does not allow any events. _Why:_ This is fundamental for running CI when repositories in a node change. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given file radenv.sh @@ -652,7 +671,7 @@ only processes events from its persistent event queue. _Why:_ This is primarily useful for testing the CI broker queuing implementation. -_Stakeholders:_ Lars. +_Who:_ `cib-devs` We verify this by adding events to the queue with `cibtool`, and then running the CI broker and verifying it terminates after processing the @@ -695,7 +714,7 @@ correctly. _Why:_ This is necessary, if not necessarily sufficient, for concurrent database use to work correctly. -_Who:_ Lars. +_Who:_ `cib-devs` Due to limitations in Subplot we mange the concurrent processes using a helper shell script,k `count.sh`, found below. It runs two @@ -779,7 +798,7 @@ event, and remove an event. _Why:_ This is the minimum functionality needed to manage the event queue. -_Who:_ Lars. +_Who:_ `cib-devs` We verify that this works by adding a new broker event, and then removing it. We randomly choose the repository id for the CI broker @@ -816,7 +835,7 @@ events. _Why:_ This is needed for testing, and for the node operator to be able to do this cleanly. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given an installed cibtool @@ -836,7 +855,7 @@ changing the repository. _Why:_ This allows running CI on a schedule, for example. It's also useful for CI broker development. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario @@ -859,7 +878,7 @@ _Want:_ `cibtool` can add information about a triggered CI run. _Why:_ This is primarily needed for testing. -_Who:_ Lars. +_Who:_ `cib-devs` ~~~scenario given an installed cibtool