← Thu, Nov 19 digest

FailTrace – Reproduce a failed GitHub Actions run locally from its URL

read article ↗ hn thread ↗

FailTrace is a new CLI tool that analyzes a failed GitHub Actions run URL and reproduces the failure locally inside a Docker container.

summary is enough The README clearly explains the CLI commands, architecture, and Docker integration, making a quick scan sufficient unless you plan to use the tool immediately.

summary

FailTrace bridges the gap between CI failures and local debugging by parsing GitHub Actions run logs, matching workflow definitions to the exact commit, and recreating the environment in Docker. The tool provides three primary commands to inspect logs, generate reproduction plans with exact toolchain versions, and execute tests locally to confirm identical failure states. It aims to save developer time and token usage for AI coding assistants by stripping away log noise and pinpointing exact failure causes.

key points

  1. Takes a GitHub Actions URL and automatically isolates the exact failing job, matrix combination, step, and commit tested by CI.
  2. Recreates the runtime environment in Docker using exact toolchain versions extracted from runner logs and configuration files.
  3. Supports iterative local debugging by allowing developers to test local code fixes against the failing step.

who should read it

Backend and DevOps engineers who frequently troubleshoot obscure or environment-dependent GitHub Actions failures.

discussion positive

consensus

Commenters compared it to existing tools like act and native GitHub features, prompting the creator to clarify that FailTrace focuses specifically on debugging historical run failures rather than pre-running workflows.

pushback

Some users questioned whether accurately mirroring complex runner environments inside lightweight Docker containers is practical or reliable.

best comment by ri4dh ↗

Yes, it's Docker, and I don't try to rebuild GitHub's full runner image, that's tens of GB of preinstalled tools. It builds a much smaller environment from what the job needed:

Base image: the Ubuntu version the runner used (from the log), plus the common packages scripts expect (git, curl, make, jq, python3, sudo...). If the job declares a container, it uses that image exactly. This image is built once and cached by a hash of its contents.

Toolchains: setup-go/node/python aren't run. The log shows the exact version the runner used (e.g. /opt/hostedtoolcache/go/1.22.7/x64), and FailTrace …

The creator details how FailTrace avoids rebuilding heavy runner images by using customized base environments and extracting exact toolchain paths from logs.

Generated by an LLM from the article and thread. Check the sources before relying on it.