Skip to content

Commit 3c1a827

Browse files
a-wainuclearcat
authored andcommitted
doc: update to reflect latest changes in state transitions
We no longer transition successful `kbuild` nodes directly to `done` state, but go through `available` first. This state triggers test jobs' creation, while we can schedule post-processing jobs when the node finally reaches the `done` state` (once every test job is complete, or the timeout is reached). Ensure the documentation (especially the examples) reflects the current design. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
1 parent e56e5f3 commit 3c1a827

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

doc/connecting-lab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ scheduler:
116116
event:
117117
channel: node
118118
name: kbuild-gcc-10-arm64
119-
result: pass
119+
state: available
120120
runtime:
121121
type: lava
122122
name: lava-broonie

doc/developer-documentation.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,19 @@ Here is the description of each field:
160160
state: available
161161
```
162162
For a test that requires a successful completion of a build job such as `kbuild-gcc-10-arm64`, specify the event as follows:
163+
```yaml
164+
event:
165+
channel: node
166+
name: kbuild-gcc-10-arm64
167+
state: available
168+
```
169+
For a post-processing job that requires completion of all test jobs for a given build job such as `kbuild-gcc-10-arm64`, specify the event as follows:
163170
```yaml
164171
event:
165172
channel: node
166173
name: kbuild-gcc-10-arm64
167174
result: pass
175+
state: done
168176
```
169177
Here, `node` refers to the name of API PubSub channel where node events are published.
170178
- **`runtime`**: Select a runtime for scheduling and running the job. Supported runtimes include `shell`, `docker`, `lava`, and `kubernetes`. Specify the runtime type from the `runtimes` section. Note that the `name` property is required for `lava` and `kubernetes` runtimes to specify which lab or Kubernetes context should execute the test. Several LAVA labs (such as BayLibre, Collabora, Qualcomm) and Kubernetes contexts have been enabled in KernelCI.
@@ -280,7 +288,7 @@ Tarball service creates/updates a local git repo and uses it to create a kernel
280288
```mermaid
281289
flowchart TD
282290
subgraph tarball_service[Tarball Service]
283-
update_repo{Update git </br> repo failed?}
291+
update_repo{Update git <br /> repo failed?}
284292
update_repo --> |Yes| fail_checkout[Set 'checkout' node <br />state=done, result=fail]
285293
end
286294
```
@@ -289,7 +297,7 @@ Timeout service is responsible for detecting timed-out nodes and transiting them
289297
```mermaid
290298
flowchart TD
291299
subgraph timeout_service[Timeout Service]
292-
node_timedout{Checkout node </br> timed out?}
300+
node_timedout{Checkout node <br /> timed out?}
293301
node_timedout --> |state=running| running_checkout[Set 'checkout' node <br />state=done, result=incomplete]
294302
node_timedout --> |state=available/closing| available_checkout[Set 'checkout' node <br />state=done, result=pass]
295303
end

doc/pipeline-details.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,20 @@ flowchart
2828
end
2929
subgraph Run Builds/Tests
3030
runner_node --> runtime[Runtime Environment]
31-
runtime --> set_available[Update node<br />state=available, result=None, set holdoff]
32-
set_available --> run_job[Run build/test job]
31+
runtime --> run_job[Run build/test job]
3332
run_job --> job_done{Job done?}
34-
job_done --> |Yes| pass_runner_node[Update node<br />state=done, result=pass/fail/skip]
33+
job_done --> |Yes| job_pass{Job successful?}
3534
job_done --> |No| run_job
35+
job_pass --> |Yes| job_kind{Job kind?}
36+
job_kind --> |Build| pass_build_node[Update build node<br />state=available, result=pass<br />set holdoff]
37+
job_kind --> |Test| pass_test_node[Update test node<br />state=done, result=pass]
38+
job_pass --> |No| fail_node[Update failed node<br />state=done, result=fail/skip]
3639
end
3740
subgraph timeout_service[Timeout Service]
3841
get_nodes[Get nodes <br /> with state=running/available/closing] --> node_timedout{Node timed out?}
3942
verify_avilable_nodes{Node state is available?} --> |Yes| hold_off_reached{Hold off reached?}
4043
hold_off_reached --> |Yes| child_nodes_completed{All child <br />nodes completed ?}
41-
child_nodes_completed --> |Yes| set_done[Set parent and child nodes <br /> state=done]
44+
child_nodes_completed --> |Yes| set_done[Set node <br /> state=done]
4245
child_nodes_completed --> |No| set_closing[Set node <br />state=closing]
4346
node_timedout --> |Yes| set_done
4447
node_timedout --> |No| verify_avilable_nodes
@@ -65,12 +68,12 @@ When the trigger pushes a new revision node (checkout), the tarball receives a p
6568

6669
### Runner
6770

68-
The Runner step listens for pub/sub events about available checkout node. It will then schedule some jobs (it can be any kind of job including build and test) to be run in various runtime environments as defined in the pipeline YAML configuration from the Core tools. A node is pushed to the API with "available" state e.g. "kunit" node. This will generate pub/sub event of build or test node creation.
71+
The Runner step listens for pub/sub events about available checkout node. It will then schedule some jobs (it can be any kind of job including build and test) to be run in various runtime environments as defined in the pipeline YAML configuration from the Core tools. A node is pushed to the API with "running" state e.g. "kunit" node. This will generate pub/sub event of build or test node creation.
6972

7073
### Runtime Environment
7174

7275
The jobs added by runner will be run in specified runtime environment i.e. shell, Kubernetes or LAVA lab.
73-
Each environment needs to have its own API token set up locally to be able to submit the results to API. It updates the node with state "done" and result (pass, fail, or skip). This will generate pub/sub event of node update.
76+
Each environment needs to have its own API token set up locally to be able to submit the results to API. It updates the node with state ("available" or "done" depending on the job type) and result (pass, fail, or skip). This will generate pub/sub event of node update.
7477

7578
### Timeout
7679

0 commit comments

Comments
 (0)