Hasty Briefsbeta

Bilingual

Stamp It! All Programs Must Report Their Version

18 hours ago
  • #debugging
  • #incident-response
  • #software-versioning
  • The article recounts a production incident where lack of visibility into software versions and rollouts caused delays, highlighting the need for robust versioning practices.
  • It proposes a three-step solution for effective versioning: stamping the VCS revision, ensuring it's plumbed through the build and packaging processes, and reporting it in various outputs (like --version flags, logs, and HTTP headers).
  • Software versioning should ideally include VCS revisions (e.g., Git commit hashes) for precision, similar to household appliances that have detailed identification, to aid debugging and incident response.
  • A case study of the i3 window manager illustrates best practices, such as the --version and --moreversion flags that provide clear, detailed version info, including release dates and Git revisions.
  • Go programming language is praised for its default VCS buildinfo stamping, which automatically includes Git revisions in binaries, making version identification straightforward.
  • Challenges with version stamping in NixOS are discussed, where VCS info can be lost due to build reproducibility measures, but a solution via the go-vcs-stamping overlay is presented.
  • Recommendations include implementing 'version observability' across systems to save time during incidents, with examples for different contexts like executables, services, HTTP requests, and user interfaces.