kcidb client project
This page has information about the kcidb client project.
The plan is to implement a kcidb client for Fuego.
I would like for a Fuego lab to be able to submit test results to kcidb, for two reasons:
- 1) to add required fields needed for Fuego and some of Fuego's features to kcidb
- 2) to give Fuego the capability to send bug reports to upstream developers, where they can do some good, without having to add a ton of infrastructure to Fuego
To do [edit section]
for testing [edit section]
manually [edit section]
- test kcidb using existing client, to determine required fields
- manually convert run.json into kcidb data
- need a revision_id - must be a 40-digit hash
- for now, use hash of firmware_version
- need an origin: use "fuego"
- decide first test result to submit: pot1.default.
- need a revision_id - must be a 40-digit hash
- automatically convert run.json to kcidb data
- add revision_id to run.json
- add build_id to run.json
- add test_id to run.json??
- see other notes from kcidb-bof-notes.txt for converting other fields
- determine how to get json data into the kcidb docker container
- instead of 'docker cp', use a volume mount
- see plumbers chat for kcidb channel
- can do this:
docker run -it -v $PWD:/root/local-data kernelci/kcidb /bin/bash
- instead of 'docker cp', use a volume mount
- manually convert run.json into kcidb data
that command allows you to see your user's home directory as /root/local-data inside the container.
automated [edit section]
- write program to convert run.json to kcidb data
- load json and move stuff around
- fabricate required fields
- use 'echo "kernel_version" | shasum | cut -b -40 >revision_id'
for real [edit section]
- write fuego-put-kcidb as a standalone tool
- call tool from ftc put-run
- specify backend in command: ftc put-run --backend [fuego|squad|kcidb|kernelci]
- maybe also jenkins??
- specify backend in command: ftc put-run --backend [fuego|squad|kcidb|kernelci]
- call tool from ftc put-run
Here are some notes and issues:
NOTES [edit section]
There are command line clients for kcidb in the git repository: https://github.com/kernelci/kcidb.git.I tried to install this, but it requires Python 3.6, and my desktop system (and Fuego docker container) only has Python 3.5.
The kernelci team cobbled together a docker container for kcidb, which can be obtained with:
$ docker pull kernelci/kcidb $ docker run -it kernelci/kcidb bash
You will be left at a root prompt where you can run kcidb commands.
You need to install a google cloud credential, which you can get by following the instructions in kcidb/SUBMISSION_HOWTO.md
Please the credentials by copying them into the container with:
- $ docker cp credentials.json <container_id>:/root
Then, inside the container, do:
$ export GOOLE_APPLICATION_CREDENTIALS=/root/credentials.json $ kcidb-db-dump -d playground_kernelci04
You should see a bunch of kcidb data from the server.
notes on json parsing [edit section]
Should convert parsing step into two phases:- convert test output to json
- convert json to test results
This roughly corresponds to interpreting fields, and then filtering the fields. Need to think about this more.
Would be beneficial to use UNIX command line piping to convert into test results.
See json conversion tools at: https://stedolan.github.io/jq/
data [edit section]
Resources [edit section]
- Schema explanation:
- to see the kcidb granfa interface, use this URL:
- kernelci json data for a generic test (proposed)
- see https://gist.github.com/gctucker/79821ceb98313c6d832a8fed5522fbda
- in the comment it shows how this would be submitted somewhere using the 'kci_data' tool
- see https://gist.github.com/gctucker/79821ceb98313c6d832a8fed5522fbda