From Ignas Kiela to ~sircmpwn/sr.ht-dev
Found a couple things to point out: On 2023-07-20 22:09, Conrad Hoffmann wrote: > This commit adds the option to execute build jobs as Kubernetes batch > jobs. This currently requires setting a bunch of variables in > /etc/image-control.conf (some of which have to match certain values from > config.ini). > > The qemu Docker image is the same as used by regular setups (see > images/qemu). All the YAML required to glue this all together will be > published soon. The worker itself (who is calling this script) should be > running in-cluster, as a service account that has the required > permissions to manage the namespace for the build jobs. >
From Ignas Kiela to ~sircmpwn/sr.ht-dev
Additionally, update the metric used for high number of builds timing out and double the limit of high number of build submission since the high worker utilization alarm should most of the cases that submission alarm was meant to handle. --- Requires my build.sr.ht patch to be deployed for these changes to be effective build_rules.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build_rules.yml b/build_rules.yml index f0d8575..dec405b 100644 --- a/build_rules.yml [message trimmed]
From Ignas Kiela to ~sircmpwn/sr.ht-dev
Duration histogram tracks the number of builds finished, and having the number of builds running, number of builds started is trivial to calculate, while having a gauge for currently running jobs makes it easier to find current utilization. Additionally, a status label for duration metric is added, to keep track of the distribution of different build statuses that was kept by the builds finished metric. --- Apparently had this sitting around for quite a while, cleaned it up a bit today. Don't really have a propper environment to test it right now though, but IIRC everything worked when I wrote it. worker/context.go | 34 +++++++++++++++------------------- worker/main.go | 10 ++++++++++ [message trimmed]
From Ignas Kiela to ~sircmpwn/sr.ht-discuss
On 2022-12-31 15:07, Jackson Chen wrote: > Hi, > This is directed at anyone who has control over the Prometheus instance > at https://metrics.sr.ht Hi, the alert configs are in a git repository at https://git.sr.ht/~sircmpwn/metrics.sr.ht, and you could just send a patch for that into sr.ht-dev mailing list for this.
From Ignas Kiela to ~sircmpwn/sr.ht-dev
On 2022-07-08 22:22, Simon Ser wrote: > complete-build() { > - exit 255 > + echo 1 > ~/.complete-build > + exit 0 > } Shouldn't it be exit -1 or similar, to actually end the task that is currently running? With exit 0 it wouldn't trigger until the task ends, and this would break a bunch of build scripts (including sr.ht ones).
From Ignas Kiela to ~sircmpwn/sr.ht-dev
--- Was wondering why git's response times didn't go down with the jinja cache update, even though it was updated after that update went through. .builds/alpine.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.builds/alpine.yml b/.builds/alpine.yml index 6dbc7aa..fc57862 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -1,7 +1,7 @@ image: alpine/3.14 image: alpine/3.15[message trimmed]
From Ignas Kiela to ~sircmpwn/sr.ht-packages
Git protocol has been turned off permanently on March 15th, 2022: https://github.blog/2021-09-01-improving-git-protocol-security-github/ --- sr.ht/py3-srht/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sr.ht/py3-srht/APKBUILD b/sr.ht/py3-srht/APKBUILD index f3c6648..247f07f 100644 --- a/sr.ht/py3-srht/APKBUILD +++ b/sr.ht/py3-srht/APKBUILD @@ -42,7 +42,7 @@ prepare() { default_prepare cd "$builddir" git clone --depth=1 -b v4.1.1 \ [message trimmed]
From Ignas Kiela to ~sircmpwn/sr.ht-dev
On 2022-03-22 23:08, Ignas Kiela wrote: > uWSGI has a weirdish importing system, where it populates __file__ but > not __path__, so try using that if __file__ isn't found on the module. Gah, noticed only after I sent the patch, this is meant to read "so try using that if __path__ isn't found", if you could fix that when applying that would be great, thanks.
From Ignas Kiela to ~sircmpwn/sr.ht-dev
uWSGI has a weirdish importing system, where it populates __file__ but not __path__, so try using that if __file__ isn't found on the module. Also throw an exception if neither way works, since without the path the application will not work correctly anyways, and throw even more cryptic errors. --- srht/flask.py | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/srht/flask.py b/srht/flask.py index bd8afb5..bf6d20b 100644 --- a/srht/flask.py +++ b/srht/flask.py @@ -215,27 +215,33 @@ class SrhtFlask(Flask): [message trimmed]
From Ignas Kiela to ~sircmpwn/sr.ht-dev
From local testing this saves ~50ms on git.sr.ht log endpoint, and similar amounts on other endpoints, depending on how complex templates are and how many template files it requires to render. --- Found during local evaluation of pyroscope, will do a bit of a writeup later srht/flask.py | 1 - 1 file changed, 1 deletion(-) diff --git a/srht/flask.py b/srht/flask.py index 8188d4d..bd8afb5 100644 --- a/srht/flask.py +++ b/srht/flask.py [message trimmed]