Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UV mirrors settings #2333

Merged
merged 17 commits into from
Jan 28, 2025
Merged

Add UV mirrors settings #2333

merged 17 commits into from
Jan 28, 2025

Conversation

huchenlei
Copy link
Member

@huchenlei huchenlei commented Jan 23, 2025

Requires:

This PR adds python/pypi mirrors configuration to the install wizard. Users will be prompted to configure mirrors if they don't have access to the default python mirrors.

Good connection

image

Bad connection

image

Loading state

image

┆Issue is synchronized with this Notion page by Unito

Copy link

socket-security bot commented Jan 24, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@comfyorg/[email protected] 🔁 npm/@comfyorg/[email protected] None 0 26.4 kB k1oride

View full report↗︎

@huchenlei huchenlei marked this pull request as ready for review January 24, 2025 17:20
Copy link
Contributor

@jojodecayz jojodecayz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current mechanism looks good. Additional thoughts:

  1. On the "bad connection" page, should we first add a banner warning that says "Bad access to python mirror. The download might fail", similar to the bottom banners on the "good" or "loading" pages?

  2. On this “bad connection” page, users might first try to switch their network before setting mirrors. Do we have a refresh mechanism that enables the page to re-evaluate? (I'm sorry I can't directly check from the code)

@robinjhuang
Copy link
Member

Looks good! Will we provide a default mirror for python source?

const checkPypiMirrorReachable = async (mirror: string) => {
return (
isValidUrl(mirror) &&
(await electronAPI().NetWork.canAccessUrl(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we need to fix this. We probably also want to verify connection to torch mirror.

@huchenlei
Copy link
Member Author

Looks good! Will we provide a default mirror for python source?

See src/constants/uvMirrors.ts

@huchenlei
Copy link
Member Author

2. On this “bad connection” page, users might first try to switch their network before setting mirrors. Do we have a refresh mechanism that enables the page to re-evaluate? (I'm sorry I can't directly check from the code)

Fixed in #2339. User can refresh by clicking the status icon, i.e. the red cross.

@huchenlei
Copy link
Member Author

huchenlei commented Jan 28, 2025

I updated the design to be a collapsable panel. The panel is collapsed by default and shows the overall status of the mirror connections.

Good connection

Screenshot 2025-01-28 at 2 17 58 PM

Bad connection

Screenshot 2025-01-28 at 2 18 34 PM

Loading

Screenshot 2025-01-28 at 2 18 20 PM

Collapsed

Screenshot 2025-01-28 at 2 21 33 PM

@huchenlei huchenlei merged commit 430f051 into main Jan 28, 2025
2 checks passed
@huchenlei huchenlei deleted the mirror_settings branch January 28, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants