• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

thumbor / thumbor-plugins / 40602420937
99%

Build:
DEFAULT BRANCH: master
Ran 27 Oct 2026 11:29PM UTC
Jobs 7
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Oct 2026 11:28PM UTC coverage: 99.31% (+0.06%) from 99.254%
40602420937

push

github

web-flow
fix(pngcrush): run pngcrush without a shell and survive failures (#123)

The optimizer ran pngcrush through subprocess.call(shell=True) with a formatted
string and ignored the exit status. Nothing from the request reaches that
string (thumbor supplies the temp file names and the binary path comes from
thumbor.conf), but the shell was unnecessary, a failure left output_file empty,
and thumbor turns an empty output into a 500 instead of serving the unoptimized
PNG. There was no timeout either, and with the default ENGINE_THREADPOOL_SIZE
of 0 a slow run blocks the event loop.

pngcrush now runs as an argument list with the same flags, under
PNGCRUSH_TIMEOUT (default 30 seconds, 0 disables). A non-zero exit, an empty
output or a timeout logs a warning and copies the input over the output so
thumbor serves the original; pngcrush exits 0 even when it fails, so the empty-
output case gets its own message. The timeout is converted when the optimizer
is built, since a quoted thumbor.conf value or --use-environment yields a
string, and a negative, infinite or non-numeric value disables the optimizer
with an error. Unit tests use a real temp directory and a fake subprocess.run
instead of patching os.path.isfile and os.access; tearDown stopped the
os.access mock rather than its patcher, so that patch was never undone.

25 of 25 new or added lines in 2 files covered. (100.0%)

288 of 290 relevant lines covered (99.31%)

0.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-optimizers/jp2 - 40602420937.1 27 Oct 2026 11:29PM UTC 2
91.67
GitHub Action Run
2 run-optimizers/gifv - 40602420937.2 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
3 run-optimizers/pngquant - 40602420937.3 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
4 run-optimizers/jpegrecompress - 40602420937.4 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
5 run-optimizers/mozjpeg - 40602420937.5 27 Oct 2026 11:30PM UTC 2
100.0
GitHub Action Run
6 run-optimizers/pngcrush - 40602420937.6 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
7 run-optimizers/optipng - 40602420937.7 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
Source Files on build 40602420937
  • Tree
  • List 14
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40602420937
  • 2645c7d7 on github
  • Prev Build on master (#40602191909)
  • Next Build on master (#40602467120)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc