Python 3 text file encoding is still system-dependent

Python 3 assumes a default encoding of UTF-8 in a variety of useful scenarios. For example, s: str = buf.decode() will decode the byte buffer as UTF-8. And similarly for buf = s.encode(). ¬†Python 3 also defaults to encoding filenames as UTF-8, and Python 3 source code itself is encoded…

Django migrations directories cannot be namespace packages

Django's migrate command locates migration files for an app by loading a subpackage of the app, named migrations, and then searching that subpackage for modules. Unfortunately, there's a check in the code that does not allow migrations to be a namespace package. In other words, it must contain an __init_…

Terraform boolean gotcha

Terraform coerces the literal booleans false and true (e.g., when used as variable values) to 0 and 1 respectively. As a result, this ternary expression: count = "${var.myboolean == true ? 1 : 0}"unexpectedly always evaluates to 0. You want to use count = "${var.myboolean ? 1 : 0}"Or even just count…

ALB Ingress controller gotcha

If you're running a Kubernetes cluster on AWS (via EKS, kops, or otherwise), you're probably using the AWS ALB Ingress controller to create Application Load Balancers (ALBs) that map to Kubernetes Ingress resources. If so, be aware of the following gotcha: When adding ALB-specific annotations on the Ingress config, be…

Welcome to the Toolchain Engineering Blog

You've probably seen corporate engineering blogs before. You know the deal - a post every few weeks, or months, boasting about a new feature, or an open-source project with a "cool" name*, or a conference talk, all inevitably ending with "we're hiring!" Well, this blog is a little different. We…