all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Getting build information in to the Guix Data Service (draft patch)
Date: Mon, 28 Oct 2019 08:33:19 +0000	[thread overview]
Message-ID: <87pnihjmls.fsf@cbaines.net> (raw)
In-Reply-To: <8736fjqbrd.fsf@cbaines.net>

[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]


Christopher Baines <mail@cbaines.net> writes:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Christopher Baines <mail@cbaines.net> skribis:
>>
>> Should ‘BuildEvents’ be more generic and have ‘event’ be an sexp or JSON
>> string that could describe any kind of event?
>>
>> If we did that, we could keep ‘derivation’ but remove “NOT NULL” so that
>> non-derivation events can exist but we can still query
>> derivation-related events quickly.  Does that make sense?
>
> Yep, that makes sense.
>
> This seems to be the general decision about the way you use a relational
> database, do you have specific tables (types) for the data, or do you
> have a more freeform structure (columns containing sexp or JSON).
>
> There's quite a few factors to consider here, the internals of Cuirass,
> how these events are exposed through the HTTP API, how these events one
> day might be published to a WebSub hub and then what kind of
> subscriptions you might support in Cuirass (events for an individual
> derivation, all builds for an evaluation, all builds, ...). I'll think
> about it further and see if I can form an opinion either way.

So I had a think about this, and also re-read the WebSub spec [1], along
with JSON Feed which is a Atom/RSS alternative with JSON [2]. I'm still
a bit undecided about how closely to follow WebSub, as it seems more
concerned with applications like blogging, and less with moving data
between services, but I still think the principles are good. For now, I
think it's best to pick the bits of the standard that work, and leave
any that don't particularly apply.

I think a generic approach to storing the events in the database will
work better though, at least with the way the events are currently
exposed. It does make it potentially harder to expose and support
subscriptions for events for individual builds, but that can probably be
addressed later if desired.

1: https://www.w3.org/TR/websub/
2: https://jsonfeed.org/version/1

>>> +CREATE TABLE BuildEventsOutbox (
>>> +  build_event_id INTEGER NOT NULL,
>>> +  FOREIGN KEY (build_event_id) REFERENCES BuildEvents (id)
>>> +);
>>
>> These are events that have not yet been sent, right?
>
> Yep, exactly.
>
>> Thanks!
>
> Thanks for taking a look. I'll neaten up the patch a bit, add in some
> error handling and retrying for sending out the events, and think a bit
> more about the data model, then hopefully send an updated patch soon!

I've now sent an updated set of patches. The first to add events for
builds, and the second to extend this to evaluations.

I've also added in error handling to the sending of the events.

Thanks,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

  parent reply	other threads:[~2019-10-28  8:33 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20  7:41 Getting build information in to the Guix Data Service (draft patch) Christopher Baines
2019-10-20  7:49 ` [PATCH] Support publishing build events Christopher Baines via Development of GNU Guix and the GNU System distribution.
2019-10-21  9:31   ` Mathieu Othacehe
2019-10-21 21:47     ` Christopher Baines
2019-10-23 14:39 ` Getting build information in to the Guix Data Service (draft patch) Ludovic Courtès
2019-10-23 23:32   ` Christopher Baines
2019-10-28  8:10     ` [PATCH 1/2] Support publishing build events Christopher Baines
2019-10-28  8:10       ` [PATCH 2/2] Support publishing evaluation events Christopher Baines
2019-11-16 21:41         ` Ludovic Courtès
2019-11-16 23:34           ` Christopher Baines
2019-11-16 21:39       ` [PATCH 1/2] Support publishing build events Ludovic Courtès
2019-11-16 23:13         ` Christopher Baines
2019-11-17 21:26           ` Ludovic Courtès
2019-11-18  8:53             ` Christopher Baines
2019-11-28 18:36         ` Christopher Baines
2019-11-28 18:36           ` [PATCH 2/2] Support publishing evaluation events Christopher Baines
2019-11-30 14:10             ` Clément Lassieur
2019-12-03  0:21               ` Christopher Baines
2019-11-30 14:08           ` [PATCH 1/2] Support publishing build events Clément Lassieur
2019-12-03  0:12             ` Christopher Baines
2019-12-03 11:25               ` Clément Lassieur
2019-12-03 19:44                 ` Christopher Baines
2019-12-04 13:59                   ` Clément Lassieur
2019-12-28 20:17                     ` Christopher Baines
2020-01-08 11:27                       ` Ludovic Courtès
2020-01-16  8:37                         ` Christopher Baines
2019-11-30 14:23           ` Clément Lassieur
2019-12-03  0:20             ` Christopher Baines
2019-11-28 18:48         ` Christopher Baines
2019-11-30 11:15           ` Clément Lassieur
2019-12-02 23:22             ` Christopher Baines
2019-10-28  8:33     ` Christopher Baines [this message]
2019-12-28 19:05 ` [PATCH v3 " Christopher Baines
2019-12-28 19:05   ` [PATCH v3 2/2] Support publishing evaluation events Christopher Baines
2019-12-28 19:54 ` [PATCH v4 1/2] Support publishing build events Christopher Baines
2019-12-28 19:54   ` [PATCH v4 2/2] Support publishing evaluation events Christopher Baines

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=87pnihjmls.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.