My trick for "hot reloading"

A lot of the software I use embeds a scripting language for easy extension - this is great, but much of it doesn't provide facilties for "hot reloading"; that is, iterating on an extension without needing to restart the application and blow away its current state.

Read More...
Posted on 2024-03-17

Use caution when using $rate_interval along with increase()

A few months ago, I was pairing with my coworker Graham on a Grafana dashboard, and we ran into a pitfall I thought it'd be nice to share. We were trying to create a dashboard that would show how many changes happened to a database table between points on the graph, and we were getting some mysterious results!

Read More...
Posted on 2024-02-28

With SQLite, INSERT OR IGNORE Is Often Not What You Want

tl;dr - INSERT OR IGNORE will silently fail if any constraint is violated (even a NOT NULL on a column type!). If you want to express "insert this row unless it already exists", use ON CONFLICT instead.

Read More...
Posted on 2024-02-04

Which fields can you use with Kubernetes field selectors?

Field selectors are a handy filter you can provide kubectl get via the --field-selector option to pare down the list of resources you get back from the server. The docs mention that supported fields vary from resource to resource, but sadly don't mention which resources support which fields. I did a little bit of poking around, and - as far as I can tell - this isn't documented anywhere! So, seeing as reading source code is one of my Maslow's hammers, I broke out that particular hammer and got to reading.

Read More...
Posted on 2022-01-24

Follow-up on spurious wakeups

So, the fix I implemented for my wakeup problem a few weeks ago had an interesting side effect. Normally, when I put my laptop to sleep, it loses about 10% of its charge per day, which seems reasonable. After my fix, however, it started to lose 40% per day - it's not uncommon for me not to touch my laptop for a few days, so that's not great. So here's a follow-up on how I addressed that issue!

Read More...
Posted on 2022-01-12