From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03FC9138350 for ; Wed, 5 Feb 2020 12:43:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03FB2E0A9E; Wed, 5 Feb 2020 12:42:46 +0000 (UTC) Received: from atfriesa01.ssi-schaefer.com (atfriesa01.ssi-schaefer.com [193.186.16.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 96F3FE0A9E for ; Wed, 5 Feb 2020 12:42:45 +0000 (UTC) IronPort-SDR: H4BloaRLNrTLUh6wtpleIX8D8N6VAbxvf4YpGdyxDUWpnNdG/0J7KSX8sIE6DsPyMuVuohj1E1 yrdx0fN49lw7eh0w/7UN+Xx8FPI0mLnKX4WSSR7gqf+sfnVibxj908CPqmnWfa+PbM+vu7uzJd yUkoNh3XOsoJazk39HKYMHdw4Q8AUjVD2CCD8953hcWByTMwAPTLaszFdYVeWJk9vCz04n8xL/ FIkVIRC0xBvgyjDCsujCuODfRGxcZ5SYQiyJxfmdxcd7+xoiZLCFzUFH6m30N3qWKLTgpfNyxD N6Y= X-IronPort-AV: E=Sophos;i="5.70,405,1574118000"; d="scan'208";a="49962880" X-IPAS-Result: =?us-ascii?q?A2FfBADDtzpe/+shHKxlHQEBAQkBEQUFAYF7gXiBHYExh?= =?us-ascii?q?BWDSYwZAQEBBoE3g26GAo9kgSs8CQEBAQEBAQEBAQgjDAEBAoECgzwCgl84E?= =?us-ascii?q?wIDAQELAQEBBAEBAQEBBQMBAgKGIAyCdmBwAQEBAQEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBEgINVCZCAQEBAQIBIxU8CgsLGAICJgICVwYBDAgBAReDCwGCVgUvq?= =?us-ascii?q?gEaNXWBMoN9OAGBFIUNgQ4qhR4MhxJ5gQeBESeCbD6CZAKBMAEMBgGDMYJeB?= =?us-ascii?q?Jc6mCyCRIJOhHyOcwYbjniMEY5iiGqOG4RCgWmBCnF9CIJzATMJCT4YDViNU?= =?us-ascii?q?ReDUIUUgT2EA3MCCYwCEIIyAQE?= Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2020 13:42:44 +0100 Received: from [172.28.42.244] by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1izK0x-0007O4-7U; Wed, 05 Feb 2020 13:42:43 +0100 Subject: [gentoo-alt] Re: Allow non-interactive bootstrap to be stopped at arbitrary stages To: gentoo-alt@lists.gentoo.org, Sam Pfeiffer References: From: Michael Haubenwallner Message-ID: <4f42af09-7cd7-0e01-b852-f2f41b748deb@gentoo.org> Date: Wed, 5 Feb 2020 13:42:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-alt@lists.gentoo.org Reply-to: gentoo-alt@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Archives-Salt: be017eb9-1152-40c5-8e5a-e2dcfa4e8697 X-Archives-Hash: 1b6dfbd5f9c73eea6b817ab250ec7a6b On 1/13/20 10:03 AM, Sam Pfeiffer wrote: > Hello, > > To ease automated building and debugging of the bootstrap of Gentoo Prefix I would like to propose a patch to add the option to stop the non-interactive bootstrap on specific stages of the bootstrap. Given that bootstrap-prefix.sh is (=should be) able to resume from whatever interruption happened to the bootstrap process, what do you think about this alternative solution: When starting up the bootstrap process, also set up some shell timer of eg. 5.5 hours (sleep 19800) to kill bootstrap-process.sh, leaving .5 hours to upload the current docker images much like you already do even after breakage. > I'm currently doing this in my CI projects [1] [2] and I'd love to have this added upstream. > > I propose a patch like this: https://gist.github.com/awesomebytes/3468477c6c90fe3d985372d50aabba9f > > Which is what I'm currently using. It just adds another optional parameter to the commandline (a 3rd one) in non-interactive mode which you tell it after which stage to stop (stage1, stage2, stage3). FWIW, personally I do prefer commandline options over environment variables, yet there may be some reason I fail to remember why we use env vars here. However, I do prefer named over positional commandline arguments, especially when they are about additional configuration to positional arguments. > I'm not the most versed person in bash, so maybe there is a more conceptually beautiful way of doing this. My patch is just a proposal (that has been tested and running). > > This patch is useful because it allows: > 1) Easier debugging by stages. > 2) Allows to split the bootstrap job in parts in CI environments with time limits on jobs to run (e.g. Azure Pipelines time limit is 6h*, and the bootstrap takes in between 5h40-6h40 depending on random things like time to download things, and load on the machine... or packages just taking longer to build). So yes, I would love to have the bootstrap fit into Azure's 6 hours limit, to get rid of the VMs I provide using my 2 monthly EUR 45,- credit in Azure cloud. > > And this patch should not change anything to anyone else (AFAIK). > > Thanks for your time and feedback! > > P.S.: I'm used to the GitHub/GitLab workflow of having a graphical interface to do a Pull Request... I don't know how to do this with https://gitweb.gentoo.org/repo/proj/prefix.git/ > If there is no way, aside of the goal of this email, I'd propose to have a mirror in GitHub. Mirroring prefix-overlay to github (readonly, for PRs) may make sense indeed. Thanks! /haubi/