From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:39099) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpcuq-0005q1-Gv for guix-patches@gnu.org; Mon, 22 Jul 2019 14:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpcuo-0005iK-HK for guix-patches@gnu.org; Mon, 22 Jul 2019 14:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpcuo-0005ho-D5 for guix-patches@gnu.org; Mon, 22 Jul 2019 14:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpcuo-0006E3-66 for guix-patches@gnu.org; Mon, 22 Jul 2019 14:20:02 -0400 Subject: [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test. Resent-Message-ID: From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) References: <87imsci9sj.fsf@sdf.lonestar.org> <87ef30i9fl.fsf@sdf.lonestar.org> <87y3129qsn.fsf@gnu.org> <87sgr9bziq.fsf@sdf.lonestar.org> <87pnmc7nt1.fsf@gnu.org> <8736j7nwcb.fsf@sdf.lonestar.org> <87muhfjm14.fsf@gnu.org> <87ftn63l7d.fsf@sdf.lonestar.org> <87v9w1zgon.fsf_-_@sdf.lonestar.org> <87y30v3qke.fsf@sdf.lonestar.org> <871rylrjt8.fsf_-_@sdf.lonestar.org> <87wogdq575.fsf_-_@sdf.lonestar.org> <87r26lq531.fsf_-_@sdf.lonestar.org> <87muh9q51e.fsf_-_@sdf.lonestar.org> <87wogc4v6e.fsf@gnu.org> Date: Mon, 22 Jul 2019 14:16:46 -0400 In-Reply-To: <87wogc4v6e.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 20 Jul 2019 16:50:17 +0200") Message-ID: <87zhl69box.fsf@sdf.lonestar.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36555@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic! Ludovic Court=C3=A8s writes: > Really nice that it becomes this concise. Yeah, I think (and hope) this is a good sign that we've picked the right abstraction for this :) > I like to avoid exposing constructors so that one cannot =E2=80=9Cforge= =E2=80=9D > invalid objects, but let=E2=80=99s see=E2=80=A6 Should I use @@ for this, perhaps? Aside from one other place in the test suite, it's a one-off use, and the objects are then only used internally. > I wonder it we should just use > > #~(begin (use-modules (guix build utils)) (invoke =E2=80=A6)) > > here and in other places. > > That=E2=80=99s probably better longer-term (for example when we switch to > Guile=C2=A03, that could ease the transition since the right Guile would = be > used) but we can keep it this way and revisit it later. Oh that's a good point, I agree that we should do that. I'll submit a separate patch once this gets merged. > s/remote-exp/exp/ > ... > A leftover? :-) > > These two statements disappeared in the process, but I think they=E2=80= =99re > added back by one of the subsequent patches, right? Good catches, thanks! Yes, the code is added back in the commits that follow. > OK, that makes sense here. > > (Once we=E2=80=99ve done that (guix graph) demonadification we discussed > before, perhaps we can perform run =E2=80=98shepherd-service-upgrade=E2= =80=99 entirely > on the =E2=80=9Cother side=E2=80=9D, and at that point we won=E2=80=99t n= eed to expose the > =E2=80=98live-service=E2=80=99 constructor.) The main issue with calling 'shepherd-service-upgrade' on the other side is that we'd need to send over the service objects (the current 'upgrade-services-program' deals with provision symbols rather than the service objects themselves). I'm certain it's possible, it's just easier said than done. I've got time to think it through, though :) > No need to repeat the file name here. > > However there are other changes no mentioned here, for example changes > to the =E2=80=98install=E2=80=99 procedure. Could you add them to the log? > > While you=E2=80=99re at it, could you change it to: > > (info (G_ "bootloader successfully installed on '~a'~%") =E2=80=A6) > > ? Yep, sure thing. > What happens when =E2=80=98install-bootloader=E2=80=99 fails though? We s= hould make > sure that the error is diagnosed, and that the output of > =E2=80=98grub-install=E2=80=99 or similar is shown when that happens. > Note that there are now a few places where we call =E2=80=98built-derivat= ions=E2=80=99 > without calling =E2=80=98show-what-to-build*=E2=80=99 first. That means t= he UX might > be pretty bad since one has no idea what=E2=80=99s being built. > > Furthermore, that means substitutes may not be up-to-date, leading to > many =E2=80=9Cupdating substitutes=E2=80=9D messages and HTTP round trips= (as happened > with ). > > Last, doing several =E2=80=98build-derivations=E2=80=99 call with just a = couple of > derivations is less efficient than doing a single call with many > derivations; that also has an impact on the UI, if we were to call > =E2=80=98show-what-to-build*=E2=80=99 once for =E2=80=98build-derivations= =E2=80=99 call. > > What=E2=80=99s your experience with this in practice? I haven't had too many issues with it since the G-Expressions tended to have few inputs, but those are some valid concerns. Would it be better to create derivations for locally-evaluated G-Expressions? For example, with 'program-file' or 'gexp->script'? I thought that evaluating them in-place might be better since that's one fewer store item that needs to be built, but if we were to turn the G-Expression into a derivation, we could add it to the call to 'show-what-to-build*' in 'guix system reconfigure'. > Eventually we should add it to (guix gexp). Yeah, that seems to make more sense. I can move it when I address the above. > Last but not least, make sure to test this on your machine. :-) > > It=E2=80=99s sensitive code that we=E2=80=99d rather not break. Heh, indeed! I've run it several times in a virtual machine, but running it on my desktop is the ultimate "I promise this works, and if it doesn't, I'll eat my hat." I'll do an update on this machine and report back. > Perhaps you could also check the target of /run/current-system, and > maybe check things like the set of user accounts (activation code)? > > Perhaps you could also check for the availability of a =E2=80=9Creplaceme= nt=E2=80=9D > slot (info "(shepherd) Slots of services") for services that exist > both before and after the upgrade? This could be achieved by > augmenting (gnu services herd) with a =E2=80=98live-service-replacement= =E2=80=99 > procedure, I think. Great ideas! In the interest of keeping this patch manageable, I'll submit these improvements separately. > No need for docstrings for inner procedures; a comment is enough. > ... > s/new/obsolete/, no? I can address these in my corrections, though. > I think you=E2=80=99ve reached the most difficult part of this whole ende= avor. > The good thing is that, once you=E2=80=99re past this, things will be much > easier. Agreed, I think this gives us a good framework for implementing provisioning etc. Regards, Jakob --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl01/Y4ACgkQ9Qb9Fp2P 2VpF7A/9Glx0Vx7Hcb7SkbzSMeVN/MyUrFKJNkkn7GaVRRVxyZsyW1QvlR0PVTsT 6IyA803+54jdatfEuNM3sTXmU8foj+lOqnuFqDwoBS8az/Ih3mzcN3oUTViSJqLT fWARre1X9LwreTtxnnwWxQrRjEDuDZA4r4tvXxvnvVn8+Gq/TQkA5xLj8p7w2lVR StDMHgxtW16OSTrCAMguYB+93Ax53paxdMtvg2SXWOBVhTMw0g+J+pQXY38++TwM +jOg+X8SgPajGhbO2821YD/cN3FJSZ9Cvd/VKrX7HZ8KEufiRebi7o9Sb7AmXqXf bvFb57wMl0NGXuwCaIRCY/FohR0EMXeBKHHyiouqHPpfMJysud3PMKpcmafMgeR9 oobdM6xDoDoY81ztv0sT9s2rviHWsSU3+b2E2h7DyzulHrpZUv7mL+YvoBxNqJwi 7J/+Z3X4b/SzYpmRZ6rPLdLTsUjFXNI1ZhM351h477dC/c4p8zoaWczGZjY4qTf2 UIBXyhOc9y+mB8zUBHNaUN9dYKWsGPBnSPC4d0Jp798TbUfZIhbkE4VTHPg8tn0Y bJZGF27LmZ00a7JiTrq3S5leVdYOYD47avk5hhoZghjRsjfekaRMh+YHrc6aoOg8 gRLndoa1ppcdOu7LP3ZUDcsw/x5RFLk4LEeCssyh4f+KF3PcMcs= =eiWq -----END PGP SIGNATURE----- --=-=-=--