Urgent.News

What's breaking now, across thousands of outlets.

Tech

Keeping GitHub Actions reruns in an attempt ledger

I built gha-rerun-ledger for a narrow task: inspect the attempts behind recent completed GitHub Actions runs, then keep enough metadata to replay the report offline. A workflow rerun can show successful jobs that carried over from an earlier attempt. Counting every row in every attempt would count that work more than once. The CLI walks attempts in order and assigns each job ID to its first…

An open-source tool called "gha-rerun-ledger" has been developed specifically to track and analyze GitHub Actions reruns. This tool aims to compile metadata from the various attempts made during a workflow rerun, ensuring that each job ID is assigned to its initial attempt. If the same job ID appears in subsequent pages, the tool verifies that the job name, owner, conclusion, and timestamps remain consistent across all instances.

It is crucial to have a complete sequence of attempts and pages before the tool can calculate the total time for each job. The report differentiates between viewed and owned jobs, preventing double-counting of elapsed intervals for carried jobs. Every attempt is assigned a ledger row, even if it's an empty one. The tool is capable of identifying skipped jobs and handling missing or reversed intervals.

The time for each job is determined by the difference between its start and completion timestamps. Parallel jobs' times are added together, while step intervals are calculated separately and do not contribute to the overall job time. A "failed-before-pass" row requires a failure, timeout, or startup failure followed by a successful attempt of the same run, and it measures the job time that requires investigation.

The tool does not prove the existence of flaky tests, unnecessary work, or cost savings. To use the tool, a live scan through GitHub CLI is performed, which can save a schema version 1 JSON snapshot of the collected data. This snapshot includes parent metadata before and after the collection, attempt responses, page counts, and job metadata.

The tool can be validated and replayed using an input file, allowing for offline replay without requiring GitHub access. The collected data includes run and job API responses, along with commit and actor metadata. However, the tool does not retrieve log files or save authentication headers. It is recommended to review the retained metadata before sharing it.

For those interested in a broader Actions audit, gha-doctor, another tool developed by the same author, offers features such as same-commit retry analysis, slow-step history, and recommendations. The gha-rerun-ledger tool is licensed under MIT and welcomes feedback on its coverage model and snapshot checks.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at dev.to →

More in Tech

Unstick: One Tiny Action Instead of a Plan

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I Built Unstick gives you one tiny action instead of a plan.

  • Unstick offers one tiny action instead of a full plan
  • Creator built tool after feeling overwhelmed by tasks
  • Three cards: short action, longer action, "not today"

How to Compress an Image to an Exact KB Size in the Browser (Free, No Upload)

Upload forms don't ask for "80% quality". They ask for "photo under 50KB". And every mainstream compressor hands you a quality slider and wishes you luck — compress, check size, adjust, repeat.

  • Three methods to compress images to exact KB size in browser without server upload
  • Option 1: Use ImageMagick command-line tool with target file size in KB
  • Option 3: Use dedicated web tool for binary search algorithm without server interaction

More from Sunday 4 October →