mpb v8.16.1 Stops Styled ETA Hours Wrapping At 60


mpb v8.16.1 was published on 1 September 2026. The patch is a single correctness fix in the decor package: styled ETA hours no longer wrap at 60. A remaining time of 70 hours used to print as 10:00:00 on CLI progress bars.

The full release notes and downloads are on the GitHub release page.

mpb is a Go library for terminal progress bars. Extractors, loaders, and scrapers use it to print remaining time next to a bar while a batch job runs. That remaining time string is built by chooseTimeProducer in decor/eta.go. The helper feeds AverageETA, EwmaETA, and MovingAverageETA.

Three clock styles applied % 60 to hours as well as to minutes and seconds: ET_STYLE_HHMMSS, ET_STYLE_HHMM, and ET_STYLE_MMSS. Hours are the leading unit in those formats. Wrapping them aliases every 60 hour boundary onto the same output. 70 hours became 10 hours. 130 hours became 10 hours. At exact multiples of 60 hours the hour field dropped to zero, so a job with 60 hours of work left could show 00:00:00.

Operators watching a long ETL run, a crawl, or a bulk load read that string as remaining work. Log scrapers that parse the bar line inherit the same lie. A threshold that fires when remaining time exceeds a few hours never trips if the display has already wrapped.

Minutes and seconds still use % 60. Those are subdivisions of an hour, so the modulo is correct. Pull request 168 drops the modulo on hours only. The hour field now holds the full remaining hour count.

ET_STYLE_GO was already using time.Duration.String() after a truncate to the second. That path did not wrap hours and is unchanged in this tag.

ET_STYLE_MMSS prints MM:SS until hours go above zero, then switches to HH:MM:SS. The hours > 0 check used the wrapped value, not the true remaining hours.

At exact 60 hour multiples the wrapped hour count is zero, so the decorator stayed on the short format and hid the hour field. The bar looked like it had only minutes left. Past 60 hours with a nonzero remainder, hours showed the aliased count, so 70 hours rendered as a 10 hour HH:MM:SS string. Both cases misreport remaining work. The short format is the worse of the two, because it drops the leading unit entirely.

Jobs that finish in under 60 hours never hit this branch. Overnight scrapes, multi day backfills, and large warehouse loads do. If a CLI in that class uses ET_STYLE_MMSS, v8.16.1 is the first tag where remaining time past 60 hours keeps the hour field and the long format.

The format string itself is still zero padded (%02d:%02d:%02d for the long form). Width of the hour field grows once remaining hours pass 99. Width sync across bars may shift if one bar crosses that digit boundary while others have not. That is existing decorator width behavior, not a new API.

Those producers had no direct coverage before this patch. The same pull request adds a table test over chooseTimeProducer for each style, including durations past 60 hours. The test fails on v8.16.0 and passes with the change.

That is the whole user facing delta in the tag. ChrisJr404 is listed as a first time contributor for the same pull request. The compare view from v8.16.0 to v8.16.1 shows no other functional commit.

The test is the part operators should care about after the display fix itself. Clock style ETA is easy to get wrong in small unit tests that only exercise a few minutes of remaining time. Coverage that includes 70 hours and the 60 hour boundary is what keeps the wrap from returning.

This is not a prerelease. The notes list no API break and no migration step. Bump github.com/vbauerster/mpb/v8 from v8.16.0 to v8.16.1.

Jobs that finish in under 60 hours will not see a display change. Jobs that report remaining time in ET_STYLE_HHMMSS, ET_STYLE_HHMM, or ET_STYLE_MMSS and run longer than 60 hours will stop aliasing hours. If you parse the ETA string from terminal logs, expect the hour field to grow past 59 instead of wrapping. Alerts that assumed a two digit hour in 00 to 59 need a review.

If you use ET_STYLE_GO, there is nothing to recheck for this tag. Average and EWMA math, bar refresh, and filler drawing are not part of the change.

Pin the module, rebuild the CLI, and confirm one long remaining time sample if your job class can exceed 60 hours. The GitHub release page is the canonical note for the tag.