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

Use upstream Manager. #912

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Use upstream Manager. #912

wants to merge 11 commits into from

Conversation

robinjhuang
Copy link
Member

@robinjhuang robinjhuang commented Feb 16, 2025

  • Includes bug fixes from manager:
    ltdrdata/ComfyUI-Manager@488f023
  • Fixed: migrating custom nodes: uses restore-to to fix importing custom nodes.
  • Remove extra ComfyUI-Manager when migrating/importing from another ComfyUI install
  • Updated requirements.compiled

┆Issue is synchronized with this Notion page by Unito

@robinjhuang robinjhuang requested a review from a team as a code owner February 16, 2025 02:42
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 16, 2025
@robinjhuang robinjhuang marked this pull request as draft February 16, 2025 02:42
@robinjhuang robinjhuang changed the title Draft: Rh manager new Draft: Use upstream Manager. Feb 16, 2025
@robinjhuang robinjhuang marked this pull request as ready for review February 24, 2025 22:44
@robinjhuang robinjhuang changed the title Draft: Use upstream Manager. Use upstream Manager. Feb 24, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. size:M This PR changes 30-99 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 24, 2025
Copy link

socket-security bot commented Feb 24, 2025

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@robinjhuang
Copy link
Member Author

Rebased and tested again. @webfiltered tests are failing because I updated the version to 0.4.22 and the screenshots don't match on the error page anymore. How do I update that?

@webfiltered
Copy link
Contributor

webfiltered commented Feb 27, 2025

Process is currently:

  1. Run tests
  2. Verify that the only things changed are what's expected
  3. Run this locally:
yarn run test:e2e:update
  1. Commit new expectations

All screenshot diffs are overwritten by playwright at once - doing a partial diff requires discarding any updated expectations before committing.

Edit: Adding this to testing README. Done.

@webfiltered
Copy link
Contributor

Or.. we could just resolve the problem at the source.

@sync-by-unito sync-by-unito bot closed this Feb 27, 2025
@robinjhuang robinjhuang reopened this Feb 28, 2025
@robinjhuang
Copy link
Member Author

@webfiltered Closed this by accident. I rebased and tested. It should fix a few issues with current manager, including migrating custom nodes. Can you PTAL when you have time?

Comment on lines +562 to +567
// Match the original case: 2 packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
const twoPackages = /\bWould install 2 packages(\s+\+ (toml|uv)==[\d.]+){2}\s*$/;
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const onePackage = /\bWould install 1 package\s+\+ chardet==[\d.]+\s*$/;

return twoPackages.test(output) || onePackage.test(output);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Match the original case: 2 packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
const twoPackages = /\bWould install 2 packages(\s+\+ (toml|uv)==[\d.]+){2}\s*$/;
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const onePackage = /\bWould install 1 package\s+\+ chardet==[\d.]+\s*$/;
return twoPackages.test(output) || onePackage.test(output);
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const latest = /\bWould install 1 package\s+\+ chardet==[\d.]+\s*$/;
// Match upgrade from <0.4.18: 2 additional packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
const allPackages = /\bWould install 3 packages(\s+\+ (toml|uv|chardet)==[\d.]+){2}\s*$/;
return latest.test(output) || allPackages.test(output);

If you're updating from <0.4.18 to this commit, you should need all three.. however.. possibly a better idea in a second..

Comment on lines +562 to +567
// Match the original case: 2 packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
const twoPackages = /\bWould install 2 packages(\s+\+ (toml|uv)==[\d.]+){2}\s*$/;
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const onePackage = /\bWould install 1 package\s+\+ chardet==[\d.]+\s*$/;

return twoPackages.test(output) || onePackage.test(output);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Match the original case: 2 packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
const twoPackages = /\bWould install 2 packages(\s+\+ (toml|uv)==[\d.]+){2}\s*$/;
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const onePackage = /\bWould install 1 package\s+\+ chardet==[\d.]+\s*$/;
return twoPackages.test(output) || onePackage.test(output);
// Match the original case: 2 packages (uv + toml) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/816a53a7b1a057af373c458ebf80aaae565b996b
// Match the new case: 1 package (chardet) | Added in https://github.com/ltdrdata/ComfyUI-Manager/commit/60a5e4f2614c688b41a1ebaf0694953eb26db38a
const anyCombination = /\bWould install [1-3] packages(\s+\+ (toml|uv|chardet)==[\d.]+){1,3}\s*$/;
return anyCombination.test(output);

If they downloaded a custom node that added just one of the required packages, we should still just auto-update, right?

Comment on lines +66 to +67
if (fs.existsSync(managerPath)) {
await fs.promises.rm(managerPath, { recursive: true, force: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Would really like to limit our use of node:fs to CI scripts and dev stuff. Unless node / Electron is silently wrapping this in some real multi-threaded framework magic, this can block the entire main process from responding.

node:fs/promises is the way (we have our own wrappers for fs.access)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants