Fix for hanging when run in an off-line environment #183
Open
jason-weirather wants to merge 11 commits intoComfy-Org:mainfrom
Open
Fix for hanging when run in an off-line environment #183jason-weirather wants to merge 11 commits intoComfy-Org:mainfrom
jason-weirather wants to merge 11 commits intoComfy-Org:mainfrom
Conversation
… set optionally. added PEP 585 type hints to functions in module.
telamonian
reviewed
Sep 17, 2024
comfy_cli/update.py
Outdated
| return False, current_version | ||
| except requests.RequestException: | ||
| # print(f"Error checking latest version: {e}") | ||
| # Fail quietly on timeout or any request exception |
Contributor
There was a problem hiding this comment.
Suggested change
| # Fail quietly on timeout or any request exception | |
| print(f"Warning: unable to fetch {package_name} version metadata from Pypi. Retaining current version {current_version}") |
Contributor
There was a problem hiding this comment.
probably shouldn't fail silently
Contributor
|
Overall LGTM! Just one small nit with emitting a warning instead of failing silently on pypi request timeout/failure |
…g default settings this warning should be displayed
…he fully offline mode since its getting hit dispite disabiling tracking
…stants to a string which is assumed to a bool causing it to always evaluate to true
…uration, so don't cast to a bool when checking that
Author
|
@telamonian Thank you for you for the review, I noticed the package does have a logging module so I have propose a change that uses that. While testing, I ran into another hang in my testing environment that I think uncovered a bug and try to address that. Summary of Changes:
Apologies for the 11 commits, I kept thinking I had this sorted then found a little more thread. |
Contributor
|
@jason-weirather Hello, if you want you can rebase this and we will continue with the teat/merge process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed fix for the issue where running in an off-line environment hangs on check_for_updates.
Adds a default 10 second timeout to the request
Shortened to 3 second timeout in the launcher and env command calls where check_for_updates is not a requirement.
Consistent with the previous request code, if it times out it will fail quietly and return false and the current version.
Issue being addressed:
#175
Also added PEP 585 type hints to functions in the updates module.