Commit Graph
17 Commits
Author SHA1 Message Date
Daniel HiltgenandGitHub 43983edf18 progress: fix data races on ticker, states, spinner, and bar state (#17445)
* progress: fix data races on ticker, states, spinner, and bar state

NewProgress spawned start() which wrote p.ticker while stop() read and
cleared it with no synchronization; stop() and StopAndClear() also read
p.states and p.pos outside p.mu, Spinner's start() goroutine raced
Stop() and String() on s.value/s.stopped/s.ticker, and Bar.Set raced
Bar.String on currentValue/stopped/buckets (callback goroutine vs the
render goroutine). Detected by go test -race across cmd and cmd/launch
(~20 warnings; the Bar race is latent — never flagged because tests
don't interleave it, but real in production pull/push progress).

Create tickers before spawning the render goroutines and pass the
channel in, guard Progress internals with p.mu throughout stop() (via a
renderLocked core), and give Spinner and Bar their own mutexes.

* use a more idiomatic channel based done signal
2026-08-04 15:06:15 -07:00
Michael YangandGitHub d931ee8f22 create blobs in parallel (#10135)
* default max term height
* error on out of tree files
2025-05-05 11:59:26 -07:00
Michael Yang b732beba6a lint 2024-08-01 17:06:06 -07:00
Patrick DevineandGitHub 1b272d5bcd change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00
Michael Yang 424d53ac70 progress: fix bar rate 2023-11-28 11:44:56 -08:00
Jeffrey Morgan f2113c1fc7 fix potential error in progress bar calculation 2023-11-21 12:48:20 -05:00
Jeffrey Morgan 6452e2ecb8 fix cases where progress bar would not be fixed size 2023-11-21 12:07:25 -05:00
Jeffrey Morgan aabd71aede fix rendering and variable width issues on progress bar 2023-11-21 10:02:37 -05:00
Jeffrey Morgan 8c4022b06b fix initial progress stats 2023-11-20 14:33:46 -05:00
Jeffrey Morgan 433702f421 hide progress stats on completion 2023-11-20 14:22:39 -05:00
Jeffrey Morgan f10ac5de19 restore stats updated every second to progress bar 2023-11-20 10:58:19 -05:00
Jeffrey Morgan e6ad4813d3 dont crash when redirecting stderr 2023-11-19 23:50:45 -05:00
Jeffrey Morgan c06b9b7304 update progress rendering to be closer to v0.1.10 2023-11-19 13:43:21 -05:00
Jeffrey Morgan 95b9acd324 improve pull percentage rendering 2023-11-19 11:00:43 -05:00
Jeffrey Morgan 04cbf5ccc0 progress bar styling improvements 2023-11-19 09:54:33 -05:00
Michael Yang 4d677ee389 no divide by zero 2023-11-17 10:06:19 -08:00
Michael Yang c4a3ccd7ac progress 2023-11-17 10:06:19 -08:00