How to Test Code that Executes Subprocesses

I was writing some stuff that programmatically executed terraform via Hashicorp's terraform-exec library this week. This works by interacting with a terraform executable that you provide (along with a working directory) to the NewTerraform constructor. Here's the trick: when testing this code it does not need to interact with the real executable. It can subprocess… Continue reading How to Test Code that Executes Subprocesses

How to Debug OAuth Auth Code Login Flows

This is from the oauth clients perspective. Some piece of software is implementing a login with Google or Github or {socialPlatform}, and it's not working. Client and Authorization Server are terms found in the OAuth2 spec's section on roles. Errors on the Authorization Server These are often in the form of an invalid_client error code.… Continue reading How to Debug OAuth Auth Code Login Flows

A (Small) Observability 2.0 Success Story

At PMG, we've spent the last few months instrumenting our applications with OpenTelemetry and integrating with a tracing vendor. Part of this, for me, was reading the Observability Engineering book, learning about service level objectives from it, and then reading a SLO book as well. SLOs are very exciting to me, actual relevant alerts based… Continue reading A (Small) Observability 2.0 Success Story

Dependency Inversion with Client Side Interfaces in Go

One interesting thing about Go is that it lacks and explicit implements keyword for interfaces. If you want to implement an interface, there's no extra step. As long as function signatures match the interface, or function type declaration in those cases, the interface is implemented. The same could be said of Python protocols too. Coming… Continue reading Dependency Inversion with Client Side Interfaces in Go

Posted in Go