Comfy-Org / comfy-cli

Command Line Interface for Managing ComfyUI
https://docs.comfy.org/comfy-cli/getting-started
GNU General Public License v3.0
291 stars 47 forks source link

Removing pypi `check_for_updates` from commands where it halts offline execution #176

Closed jason-weirather closed 2 months ago

jason-weirather commented 2 months ago

Checking the version of comfy-cli in commands where internet-access is not necessary, such as comfy launch and comfy env causes comfy-cli to hang in a docker container (or offline) environment.

I opened an issue to describe this https://github.com/Comfy-Org/comfy-cli/issues/175

This PR removes just those calls to check_for_updates() that ping pypi each time a comfy launch is run or a comfy env is checked where offline operation can otherwise work perfectly.

robinjhuang commented 2 months ago

Can we change the check_for_update function to fail gracefully instead?

jason-weirather commented 2 months ago

Can we change the check_for_update function to fail gracefully instead?

I think thats a reasonable solution if its very fast to fail gracefully. Otherwise we will have every command hanging for seconds while it waits trying to have a conversation with the pypi servers, and that would reduce performance in some deployments.

jason-weirather commented 2 months ago

I've submitted a new PR following @robinjhuang suggestion to add a timeout and fail quietly.

https://github.com/Comfy-Org/comfy-cli/pull/183