public inbox for kernelci@lists.linux.dev
 help / color / mirror / Atom feed
From: Nikolai Kondrashov <spbnick@gmail.com>
To: "Hambardzumyan, Minas" <minas@ti.com>
Cc: "kernelci@lists.linux.dev" <kernelci@lists.linux.dev>,
	Guillaume Tucker <guillaume.tucker@collabora.com>
Subject: Re: kcidb vs KernelCI APIs
Date: Thu, 6 Apr 2023 11:56:00 +0300	[thread overview]
Message-ID: <6d9d506b-9236-0c99-f49a-bdc7efa7eb60@gmail.com> (raw)
In-Reply-To: <d03f72ca-1efe-6912-1468-b8582dbbc2d8@gmail.com>

On 4/6/23 11:40, Nikolai Kondrashov wrote:
>> Looking at the retuned json, I see the "id" is 
>> "kernelci:staging.kernelci.org:642d52183d363bbbfd0b9bd3".
>>     a) Where did this id string come from, and how do I create such an ID if 
>> I want to submit my own test result using kcidb?
> 
> This string was generated by KernelCI Native backend when submitting its data 
> to KCIDB. I assume it took its internal test result ID 
> "642d52183d363bbbfd0b9bd3", added "staging.kernelci.org:" to indicate it's 
> coming from the staging instance, and to differentiate it from production 
> results, and then added "kernelci:" to indicate this test result is coming 
> from KernelCI itself, and to differentiate it from other CI systems.
> 
> The code doing that is likely here:
> https://github.com/kernelci/kernelci-backend/blob/main/app/utils/kcidb.py

To clarify further: the submitting CI system is solely responsible for keeping 
the IDs of the objects it sends to KCIDB unique among themselves. You can 
generate them however you wish, as long as they don't clash between 
themselves. E.g. you could concatenate the name of the host where the test 
executed with a timestamp, and the test process PID, to get a unique-enough 
ID. Or get them from the database you're storing your test results in, if you 
have any.

You're required to format them as a string and prepend them with "ti:" before 
submitting to KCIDB, though. The latter ensures that your IDs don't clash with 
IDs from others.

Nick

  reply	other threads:[~2023-04-06  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ec413cbe0205479b8beb25f3d1c6dfc1@ti.com>
2023-04-06  8:40 ` kcidb vs KernelCI APIs Nikolai Kondrashov
2023-04-06  8:56   ` Nikolai Kondrashov [this message]
2023-04-06 11:03     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d9d506b-9236-0c99-f49a-bdc7efa7eb60@gmail.com \
    --to=spbnick@gmail.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=kernelci@lists.linux.dev \
    --cc=minas@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox