-
Notifications
You must be signed in to change notification settings - Fork 39
KCIDB Protocol Fundamentals
Nikolai Kondrashov edited this page Apr 4, 2025
·
3 revisions
This defines motivation, principles, and particulars of KCIDB I/O protocol and data format. The protocol is intended for exchanging Linux kernel test results between CI systems and databases, and for event notifications.
- The canonical message format is JSON accompanied by a schema.
- The schema is versioned. Version consists of two numbers: major and
minor. Minor number is increased on backwards-compatible changes. And major
number - for backwards-incompatible.
- Any data created for a lower minor version would be accepted by the schema with a higher minor version, given the major version number is the same. I.e. it should be possible to simply increase the specified minor version number without changing the data at all, and it would still be valid.
- Some data created for a lower major version number will not be accepted by a schema with a higher major version number. That is, it is impossible to get arbitrary data created for a lower major version number to validate with a higher major version number by simply changing that number in the data.
- Submitters ("origins") generate IDs of objects they submit themselves, and are responsible for their uniqueness.
- Each origin gets their own namespace for object IDs, using
<origin>:prefix. - All results can be submitted in one go, one object per submission, and everything in between.
- Every object, including embedded ones, has a
miscfield accepting an object with arbitrary contents. This field is intended as an "escape hatch" for CI systems to provide data which wouldn't fit into already-formalized fields, and as a way for KCIDB developers to get a sample of such data for eventual formalizing. - No field can have
nullvalue, except undermiscobjects. - Order of submissions doesn't matter.
- Between two submissions of an object (having the same ID) specified fields
will be picked over unspecified, but if a field is specified in both with
different values, it's value will be picked non-deterministically.
NOTE:
miscobjects are picked as a whole. - Following the above, submissions repeated exactly are a no-op.
- Received data is acted upon only once it is good enough for a particular purpose. Purposes may differ in requirements for the data.