RSS Amplifier

Blog

hoelz.ro

RSS feed for hoelz.ro

hoelz.roRSS feed ↗15 posts

Latest posts

The Case of the Moving Merge Base

A while ago, my friend and coworker Matt pinged me with a Git question. He was looking into an issue with a GitHub Actions workflow that only runs on files that changed in a given pull request, and a user reported that it was running against way too many files - so many, in fact, that the workflow was failing because it was exceeding the maximum command line length! Read More...

Filtering out nan values with Prometheus

When writing PromQL, I very rarely run into nan , but when I do , it can be kind of a pain to deal with, since it: Read More...

Using SQLite's immutable and mode flags to get around "database is locked" error

One great thing about SQLite is that it's a super-widely-used format, so you can fire up sqlite3 to poke around your applications' data, or use your favored programming language's SQLite library. However, oftentimes you'll get this error message (eg. when accessing Firefox's various *.sqlite files): Read More...

Which labels will Prometheus send to Alertmanager?

Like many users of Prometheus, at work we use labels with AlertManager's routing to make sure the right people get paged when something goes wrong. Prometheus allows you to provide their labels via a number of sources (if I missed any, please reach out and let me know!): Read More...

Using git-describe output for version pinning

The fact that tj-actions/changed-files was compromised is kind of old news at this point, but I had an insight the other day about this problem and its remediation that I haven't seen mentioned yet. Read More...

Prometheus Vector Operations Are Not Associative

I was working on a PromQL query at work to find disk usage on Kubernetes control plane nodes - the first step was to identify those nodes: Read More...

Restic Snapshot Groups, AKA "Why isn't restic forgetting my snapshots?"

I use restic to manage backups on my machines, and not too long ago I ran into some surprising behavior that I thought I'd share. Read More...

Use GOTOOLCHAIN to run older versions of the Go toolchain

I've been working through Mastering Distributed Tracing to learn more about (you guessed it) tracing. The book is from 2019, and while I've been assured that its contents are still sufficiently up-to-date, the Go-based code examples are a bit dated; namely, they use dep for dependency management, rather than the new(er) built-in module system. dep seems like a fine tool that had its time, but…

Beware staleness when creating recursive recording rules in Prometheus

At work , we have a Prometheus metric from our build system named autobuild_build_timestamp that exports the timestamp for the latest build for a given application and Git branch. The process that exports this is stateless, so if it restarts or a new version of it is deployed, we're out of luck if we want to do something like build a dashboard to show the latest builds. One thing we can do is use…

Why is my Lambda function getting retried when getting synchronously called from the command line?

I recently ran into a surprising behavior when calling a Lambda function from the command line that I thought I'd share. Read More...

Tips and Tricks Picked Up From Using a Large Language Model to Search My Personal Wiki By "Vibe"

Recently, I wanted to find a document in my personal wiki that mentioned the idea of "there will always be another coding task" - unfortunately, traditional search came up short here, because I couldn't remember the exact wording I used, only the "vibe" of this particular phrase. However, I've been looking for a reason to use a large language model (aka LLM) with my wiki, and while there are other…

Thinking about Clever Code

The trick I covered in my previous post got me reflecting on "clever" code. Most developers I know (myself included) have learned to mistrust clever code - we see it and the intuition we've developed provokes a gut reaction of "oh no, how can this blow up in my face?" Read More...

A neat trick I found in glibc

While digging in and doing research for my previous post , I came across a really cool trick that glibc uses to provide a single macro for invoking system calls, no matter how many arguments they take. I thought I'd share the trick here, along with an explanation on how it works for those unfamiliar with the C preprocessor. Read More...

bpftrace: needing to cast when filtering on negative numbers and why

A few months ago I was using bpftrace to implement a program to monitor writes to a specific directory, and while working on this program I encountered some noteworthy behavior around bpftrace and its filters that I thought I should share. Read More...

Applying Git's pickaxe option across multiple lines of YAML using textconv

For this post, I wanted to talk about a trick I came up a few years ago with to apply Git's pickaxe option in a situation where the change I was interested in wasn't contained in a single line. I'm hoping that readers of this post take away not only the trick itself, but also a perspective on how we can leverage Git's flexibility to create even more powerful tools for searching history! Read…