I've set up my personal sourcehut instance with build.sr.ht.
However, my sourcehut builds kept failing (they won't even start):
> [#14] 2023/11/04 19:10:53 Booting image alpine/edge (default) on
port 22113
> [#14] 2023/11/04 19:10:53 Waiting for guest to settle
> [#14] 2023/11/04 19:12:53 Error: Settle timed out after 3 attempts
After looking at the worker source code,
I noticed that the settle timeout is hard-coded to 120 seconds [1].
Because it is hard-coded, I had to rebuild the worker and replace the
binary to change it (5 minutes did the trick, because it takes about 2
1/2
minutes to spin up).
> [#16] 2023/11/05 09:28:23 Booting image alpine/edge (default) on
port 22115
> [#16] 2023/11/05 09:28:23 Waiting for guest to settle
> [#16] 2023/11/05 09:30:56 Sending tasks
I think it might be a good idea to integrate the settle timeout into the
sourcehut config.ini (with a 120 second default), as this would allow
adjustment on slower systems or CI images that might take longer to
boot.
Also, I understand that a CI shouldn't take long to boot, but most of
the
time I'll be doing something else while the build runs, so it doesn't
really matter.
[1]:
https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/tasks.go#L103