unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: phodina <phodina@protonmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Service development workflow
Date: Sat, 04 Sep 2021 21:24:28 -0400	[thread overview]
Message-ID: <87eea3byr7.fsf@gmail.com> (raw)
In-Reply-To: <tXm-TAVcVloD9XQNt_ubBOnGQPswXmPz-eBReL5qUdhkIfz4PgjurXhV_kn2Md9kcOacWOFBZIPFrqXgNWjDnbe6ORoImCxaPhBWub0N1x8=@protonmail.com> (phodina@protonmail.com's message of "Sat, 04 Sep 2021 14:53:56 +0000")

Hi,

phodina <phodina@protonmail.com> writes:

> Hi there,
>
> I'm curious what development workflow do you use for implementing a service.
>
> Here's mine:
>
> 0 define a new service in my channel services directory
> 1 add this new service in definition of OS
> 2 use guix system container to build container image with --load-path
> pointing to the local channel with the service
> 3 run the newly created container
> 4 check with the herd status the service is running
> 5 check and interact with the service itself
> 6 iterate till satisfaction
> 7 git & peace :-)

Due to bugs in Shepherd services having the potential to hang Shepherd,
and because such bugs are critical to catch, test driven development
seems to work best.  It also provides a faster iteration loop that the
above flow.

I wrote a jami-service-type recently, and that was a very good example
of a service that I needed tests for, as it was very tricky to get all
the parts right and needed a lot of debugging.

The operating system to test could be made a 'guix system vm' and I'd
SSH into it at times to manually test things.

The (huge) commit for jami-service-type was
10f554700c417b84c22c56fdd007567a52c45d75; you can refer to it to see how
I implemented the tests.  The other service modules are of course very
useful too!

Hope it helps!

Maxim


      reply	other threads:[~2021-09-05  1:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04 14:53 Service development workflow phodina
2021-09-05  1:24 ` Maxim Cournoyer [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87eea3byr7.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=phodina@protonmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).