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

thumbor / thumbor-plugins / 40602467120
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:29PM UTC coverage: 99.349% (+0.04%) from 99.31%
40602467120

push

github

web-flow
fix(jpegrecompress): run jpeg-recompress without a shell, survive failures (#124)

The optimizer ran jpeg-recompress 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 and a failure left
output_file empty, which thumbor turns into a 500 instead of the unoptimized
JPEG. jpeg-recompress can exit 1 without writing output when its final encode
is not smaller than the input, so this was reachable with valid input (a small
flat-color JPEG served with PROGRESSIVE_JPEG = False reproduces it). There was
no timeout either, and --accurate --loops 10 is its slow mode; with the default
ENGINE_THREADPOOL_SIZE of 0 a slow run blocks the event loop.

jpeg-recompress now runs as an argument list with the same options plus
--quiet, which only silences the per-iteration progress lines so the warning
carries the actual error, under JPEGRECOMPRESS_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. 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. The unused PIL import is gone, and
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.

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

305 of 307 relevant lines covered (99.35%)

0.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-optimizers/gifv - 40602467120.1 27 Oct 2026 11:30PM UTC 2
100.0
GitHub Action Run
2 run-optimizers/pngquant - 40602467120.2 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
3 run-optimizers/mozjpeg - 40602467120.3 27 Oct 2026 11:31PM UTC 2
100.0
GitHub Action Run
4 run-optimizers/pngcrush - 40602467120.4 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
5 run-optimizers/jpegrecompress - 40602467120.5 27 Oct 2026 11:29PM UTC 2
100.0
GitHub Action Run
6 run-optimizers/optipng - 40602467120.6 27 Oct 2026 11:30PM UTC 2
100.0
GitHub Action Run
7 run-optimizers/jp2 - 40602467120.7 27 Oct 2026 11:29PM UTC 2
91.67
GitHub Action Run
Source Files on build 40602467120
  • 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 #40602467120
  • e641d4fc on github
  • Prev Build on master (#40602420937)
  • Next Build on master (#40602683860)
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