Skip to content

fix: add timeout to PyPI update check to prevent hanging offline#378

Merged
bigcat88 merged 1 commit intomainfrom
fix-update-check-timeout
Mar 14, 2026
Merged

fix: add timeout to PyPI update check to prevent hanging offline#378
bigcat88 merged 1 commit intomainfrom
fix-update-check-timeout

Conversation

@bigcat88
Copy link
Contributor

requests.get() in check_for_newer_pypi_version() had no timeout, causing comfy launch, comfy env, and comfy install to hang indefinitely in offline or containerized environments.

Added a 3-second timeout and a logging.warning() on failure so it fails gracefully instead of blocking forever. Added tests covering newer version detection, same version, timeout, connection error, and HTTP error scenarios.

Closes #175. Supersedes #183 (that PR also fixed config_manager bool handling and tracking, both of which have been addressed separately since then).

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Mar 14, 2026
@bigcat88 bigcat88 force-pushed the fix-update-check-timeout branch from 09368fc to 1e676ee Compare March 14, 2026 08:05
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 14, 2026
@bigcat88 bigcat88 merged commit e01212b into main Mar 14, 2026
13 checks passed
@bigcat88 bigcat88 deleted the fix-update-check-timeout branch March 14, 2026 08:18
@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #378      +/-   ##
==========================================
+ Coverage   62.87%   62.99%   +0.11%     
==========================================
  Files          33       33              
  Lines        3688     3691       +3     
==========================================
+ Hits         2319     2325       +6     
+ Misses       1369     1366       -3     
Files with missing lines Coverage Δ
comfy_cli/update.py 91.89% <100.00%> (+9.53%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Containerized execution hangs because of update checks

1 participant