~ignaloidas

~ignaloidas/public-inbox

Last active 1 year, 4 months ago
View more

Recent activity

[PATCH core.sr.ht] build: switch to alpine 3.15 3 months ago

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]

[PATCH sr.ht-apkbuilds] py3-srht: Move bootstrap clone to https protocol 3 months ago

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]

Re: [PATCH core.sr.ht 2/2] Rework module path detection 3 months ago

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.

[PATCH core.sr.ht 2/2] Rework module path detection 3 months ago

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]

[PATCH core.sr.ht 1/2] Re-enable the jinja template cache 3 months ago

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]

[PATCH git.sr.ht] Get all author users with a single query for log 3 months ago

From Ignas Kiela to ~sircmpwn/sr.ht-dev

Right now repos log page is the slowest page on git.sr.ht, and a big
reason for that is that it currently averages on 19 queries per view,
most of them coming from the template looking up users to show links to
their user pages. We can get all the users we have before that, and pass
that on to the template. With these changes, a page view always takes 5
queries consistently.
---
 gitsrht/blueprints/repo.py   | 7 +++++--
 gitsrht/templates/log.html   | 2 +-
 gitsrht/templates/utils.html | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index 07c42c2..78c5680 100644
[message trimmed]

[PATCH metrics.sr.ht] Fix build queue length alert 4 months ago

From Ignas Kiela to ~sircmpwn/sr.ht-dev

Accidentally left in an old in-development metric name I used.
---
 build_rules.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build_rules.yml b/build_rules.yml
index babc8d5..f0d8575 100644
--- a/build_rules.yml
@@ -15,7 +15,7 @@ groups:
    annotations:
      summary: "High number of builds are timing out"
  - alert: High number of builds queued up
    expr: buildsrht_builds_in_queue > 5
[message trimmed]

[PATCH metrics.sr.ht] Fix High number of 500 errors alert to work instance-wide 4 months ago

From Ignas Kiela to ~sircmpwn/sr.ht-dev

This was originally intentioned to be look at the instance-wide stats,
but I have accidentally copied the wrong query from my experiments.
---
 service_rules.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/service_rules.yml b/service_rules.yml
index 314675f..b3d6665 100644
--- a/service_rules.yml
+++ b/service_rules.yml
@@ -10,7 +10,7 @@ groups:
    annotations:
      summary: "{{ $labels.instance }} has a high rate of 500 errors on  route {{ $labels.route }}"
  - alert: High rate of 500 errors on an instance
[message trimmed]

[PATCH metrics.sr.ht] Filter out low traffic routes from high number of errors alert 4 months ago

From Ignas Kiela to ~sircmpwn/sr.ht-dev

Set the cutoff to at least 1 request per minute over the past hour.
Currently around 40 routes reach this rate, which is about 10% of all
routes.
---
 service_rules.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/service_rules.yml b/service_rules.yml
index b5c0e71..314675f 100644
--- a/service_rules.yml
+++ b/service_rules.yml
@@ -3,7 +3,7 @@ groups:
- name: service
  rules:
[message trimmed]

[PATCH scm.sr.ht] Include link prefix in readme cache. 4 months ago

From Ignas Kiela to ~sircmpwn/sr.ht-dev

Fixes problems wrong links appearing in readme if the same file has
already been rendered for a different repo. Not an ideal solution, since
link prefix can be a None, a single string, or a list of two strings,
but looking at the usage it's always a list of two strings, and it
should be stable.
---
This should be released by itself and not have to wait for other commits to
git.sr.ht and hg.sr.ht. This might drop down the caching percentage, but
considering it's currently at 96% for git.sr.ht, it's not a huge concern.
 scmsrht/formatting.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scmsrht/formatting.py b/scmsrht/formatting.py
index e35d17a..8d7e84c 100644
[message trimmed]