~bitfehler

https://bitfehler.net

~bitfehler/vomit

Last active 11 days ago

~bitfehler/public-inbox

Last active a month ago

~bitfehler/names.sr.ht-discuss

Last active 5 months ago
View more

Recent activity

[PATCH builds.sr.ht] api: pass job owner to StartJobGroupUnsafe() 5 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

This allows it to make use of the index on `owner_id` in the `job`
table. Without this, the query it makes is prohibitively expensive. A
sample query analysis went from > 1800 ms without the index to < 1ms
when using the index.
---
 api/graph/resolver.go         | 8 +++++---
 api/graph/schema.resolvers.go | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/api/graph/resolver.go b/api/graph/resolver.go
index ad9020c..9e30065 100644
--- a/api/graph/resolver.go
+++ b/api/graph/resolver.go
@@ -66,7 +66,7 @@ func FetchLogs(ctx context.Context, url string) (*model.Log, error) {
[message trimmed]

[PATCH builds.sr.ht] Update core-go and pq (Postgres driver) 5 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

---
 api/go.mod | 4 ++--
 api/go.sum | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/api/go.mod b/api/go.mod
index 865d904..a427891 100644
--- a/api/go.mod
+++ b/api/go.mod
@@ -3,13 +3,13 @@ module git.sr.ht/~sircmpwn/builds.sr.ht/api
go 1.16

require (
	git.sr.ht/~sircmpwn/core-go v0.0.0-20221025082458-3e69641ef307
[message trimmed]

[PATCH core-go] Update pq (Postgres driver) to latest version 5 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

---
 go.mod | 2 +-
 go.sum | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/go.mod b/go.mod
index b542689..23cdf08 100644
--- a/go.mod
+++ b/go.mod
@@ -20,7 +20,7 @@ require (
	github.com/google/uuid v1.0.0
	github.com/hashicorp/golang-lru v0.5.1 // indirect
	github.com/kavu/go_reuseport v1.5.0
	github.com/lib/pq v1.8.0
[message trimmed]

Re: SSH key last used indicator broken? 6 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-discuss

On 11/24/22 18:45, Adam M. Stück wrote:
> I setup my account 4/5 days ago and have been working with git 
> exclusively through SSH.
> 
> In my meta.sr.ht, the key states Last Used: Never

Not entirely sure if this is the case here, but the "last used" date 
gets updated during the user lookup for an incoming SSH key, which in 
turn is subject to caching (up to a week). Hence, the date can be off up 
to a week. I'm just guessing that the key might get cached on creation, 
too. If the date is still the same in a week, then something is broken 
for sure :)

Drew: given that this date is displayed prominently and can be

[PATCH hub.sr.ht] webhooks: add error handling for patch submission 6 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

Currently, any 400 error that occurs will be swallowed by
`SrhtService.post()` [1] - the caller must use a validation object to
become aware of an error.

This commit adds such error handling by means of a validation object to
the build submission webhook.

[1]: https://git.sr.ht/~sircmpwn/hub.sr.ht/tree/f37b9e6e/item/hubsrht/services.py#L56-60
---
I initially considered just raising an exception if the caller did not
pass in a validation object [2], but for all I can tell this might wreak
havoc in all sorts of places. It might still be the right thing to do
eventually, but this seems for now the more appropriate solution do gain
some insights into errors occuring in that code path.
[message trimmed]

Re: Git-send-mail for maintainers? 6 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-discuss

Hi,

On 11/24/22 10:12, sourcehut@ploum.eu wrote:
> What’s your maintainer workflow with git-send-mail?

Probably relevant:

https://drewdevault.com/2022/07/25/Code-review-with-aerc.html

And since you asked: I wrote and use this:

https://crates.io/crates/vmt

See the second screencast in there for the "apply patch" flow. The idea

[PATCH builds.sr.ht] api: allow cancelling of orphaned jobs 6 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

---
I think the code comment explains it well enough. Not entirely sure if
Celery is supposed to handle cases like this, but we had at least one
case where it didn't, so I'd say it makes sense to have this?

To be explicit, I think this is safe because at this point, the
authenticated user is known to be the owner of the job, the database
says the job running on this specific runner, but the runner doesn't
know it. I don't think this could occur in any other situation.

 api/graph/schema.resolvers.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go
[message trimmed]

[GIT PULL meta.sr.ht] api: add endpoint to download invoices 8 days ago

From Conrad Hoffmann to ~sircmpwn/sr.ht-dev

The following changes since commit b08894942c8dc236bf2f9ed65e2cade76618ce47:

  Use internal anon auth for sending notifications (2022-11-10 11:21:46 +0100)

are available in the Git repository at:

  https://git.sr.ht/~bitfehler/meta.sr.ht master

for you to fetch changes up to 8c9ca5d76a29ca661fefee77a6d71b97de0c6f62:

  api: add endpoint to download invoices (2022-11-22 10:22:18 +0100)

----------------------------------------------------------------
Sending this as PR because it includes two TTF files. For your convenience, I

Re: Gmails weird mailbox dirs 11 days ago

From Conrad Hoffmann to ~bitfehler/vomit

Hey Andreas,

a different report made me realize something about yours, and in case 
you are still interested I have some updates for you:

On 10/5/22 18:03, Andreas Larsen wrote:
> I can confirm that it has pulled all the emails in the [Gmail] 
> directories even with the --exclude option:
> 
>      ~ $ mv .maildir-gmail .maildir-gmail2 # start with a fresh directory
>      ~ $ vmt -v -a gmail sync --exclude '[Gmail]'

I still can't tell you why the exclude is needed to make it work, but 
note that the one you are using does indeed only exclude the folder

Re: Deleting remote mailboxes 11 days ago

From Conrad Hoffmann to ~bitfehler/vomit

On 11/13/22 20:33, Tim Culverhouse wrote:
> I'd be happy to try it out again, let me know when it's ready and I'll give it a
> go.

There it is. I just released v0.7.0, which handles arbitrary delimtiers 
(and also dots in mailbox names). I also added a little debugging 
option, so you can verify this without deleting your mail again ;)

In your case, simply run `vsync` once, for the initial pull. Then, the 
second time, run `vsync --list`. It will show you local and remote 
mailboxes and which actions it _would_ perform on any of them. Should 
that output include `DeleteLocal` for any mailbox, I would kindly ask 
you to send it to me for debugging purposes :)