1 |
On 1/13/20 10:03 AM, Sam Pfeiffer wrote: |
2 |
> Hello, |
3 |
> |
4 |
> 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. |
5 |
|
6 |
Given that bootstrap-prefix.sh is (=should be) able to resume from whatever |
7 |
interruption happened to the bootstrap process, what do you think about this |
8 |
alternative solution: |
9 |
|
10 |
When starting up the bootstrap process, also set up some shell timer of eg. |
11 |
5.5 hours (sleep 19800) to kill bootstrap-process.sh, leaving .5 hours to |
12 |
upload the current docker images much like you already do even after breakage. |
13 |
|
14 |
> I'm currently doing this in my CI projects [1] <https://github.com/awesomebytes/gentoo_prefix_ci>[2] <https://github.com/awesomebytes/gentoo_prefix_ci_32b> and I'd love to have this added upstream. |
15 |
> |
16 |
> I propose a patch like this: https://gist.github.com/awesomebytes/3468477c6c90fe3d985372d50aabba9f |
17 |
> |
18 |
> 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). |
19 |
|
20 |
FWIW, personally I do prefer commandline options over environment variables, |
21 |
yet there may be some reason I fail to remember why we use env vars here. |
22 |
|
23 |
However, I do prefer named over positional commandline arguments, especially |
24 |
when they are about additional configuration to positional arguments. |
25 |
|
26 |
> 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). |
27 |
> |
28 |
> This patch is useful because it allows: |
29 |
> 1) Easier debugging by stages. |
30 |
> 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). |
31 |
|
32 |
So yes, I would love to have the bootstrap fit into Azure's 6 hours limit, to |
33 |
get rid of the VMs I provide using my 2 monthly EUR 45,- credit in Azure cloud. |
34 |
|
35 |
> |
36 |
> And this patch should not change anything to anyone else (AFAIK). |
37 |
> |
38 |
> Thanks for your time and feedback! |
39 |
> |
40 |
> 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/ |
41 |
> If there is no way, aside of the goal of this email, I'd propose to have a mirror in GitHub. |
42 |
|
43 |
Mirroring prefix-overlay to github (readonly, for PRs) may make sense indeed. |
44 |
|
45 |
Thanks! |
46 |
/haubi/ |