Skip to content

Use system Git for SSH fetches in the Windows updater - #15727

Closed
yzxcj797 wants to merge 1 commit into
Comfy-Org:masterfrom
yzxcj797:fix/update-ssh-fetch
Closed

Use system Git for SSH fetches in the Windows updater#15727
yzxcj797 wants to merge 1 commit into
Comfy-Org:masterfrom
yzxcj797:fix/update-ssh-fetch

Conversation

@yzxcj797

Copy link
Copy Markdown

Summary

  • Keep the existing pygit2 fetch path for normal remotes.
  • If libgit2 reports that it cannot handle the remote protocol, retry through the system Git client with an explicit refspec.
  • Reuse the fallback in both updater fetch paths so installations without a local master branch are covered.

Closes #12842

Test plan

  • pytest tests/test_windows_update.py -q
  • ruff check .ci/update_windows/update.py tests/test_windows_update.py
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2ea4d4f4-b1f8-4b23-9cf1-da1a849bf707

📥 Commits

Reviewing files that changed from the base of the PR and between c67885b and 4a13c18.

⛔ Files ignored due to path filters (1)
  • .ci/update_windows/update.py is excluded by !.ci/**
📒 Files selected for processing (1)
  • tests/test_windows_update.py

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (5)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Keep changes small, direct, and limited to the narrowest necessary code path and smallest number of files.
Prefer practical fixes, minimal dependencies, and existing repository patterns; remove obsolete, dead, unreachable, or unused code.
Preserve existing APIs, node names, model-loading behavior, file layout, and workflow compatibility unless replacement is explicitly intended.
Core ComfyUI must not add outbound internet requests, telemetry, tracking, reporting, remote configuration, or background network activity. User-authorized model downloads are limited to the requested artifact and must exclude telemetry and unrelated metadata.

Files:

  • tests/test_windows_update.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Keep state and capability flags on the object that owns the behavior. Prefer explicit parent-owned attributes over probing child objects with getattr; use child checks only when the child owns the delegated behavior.
Preserve shared method signatures, argument order, return shapes, side effects, and error behavior unless every affected caller and interface is intentionally updated.
Do not add unused compatibility parameters, flags, attributes, constructor options, or model-specific options to shared helpers; keep one-off behavior at the integration boundary.
Normalize third-party return conventions at integration boundaries so core code receives the expected type and shape; avoid undocumented caller-side unwrapping.
Do not add torch.no_grad, torch.inference_mode, or inference-mode wrappers. Do not add model freeze/unfreeze toggles; only disable globally enabled inference mode when a training path requires gradients.
Remove inference-only training behavior such as dropout while preserving checkpoint and state-dict compatibility; use nn.Identity when deleting a module would alter keys or ordering.
Keep imports at module scope except established optional-backend probes or imports required to avoid cycles; avoid unnecessary try/except blocks and use specific exceptions with useful fallbacks.
Do not add workarounds for unsupported library versions, especially PyTorch exception-and-float-cast retries, unless a comment names the exact versions still requiring them.
Let unsupported model formats, invalid quantization metadata, and bad states fail with clear errors instead of silently degrading output.
Match local style, keep comments sparse and useful, and remove comments that merely restate obvious code.
Treat dtype, device placement, VRAM use, and offloading as correctness concerns across CPU, CUDA, ROCm, MPS, DirectML, XPU, NPU, and low-VRAM environments.
Prefer existing ComfyUI and Comfy Kitchen operations, quantization helpers, cast/offload helpe...

Files:

  • tests/test_windows_update.py
**/*.{py,json}

📄 CodeRabbit inference engine (AGENTS.md)

Treat legacy combo, io.Combo, and io.DynamicCombo values affecting filesystem access as untrusted; revalidate them at load/save boundaries with folder_paths, containment checks, or fixed allowlists.

Files:

  • tests/test_windows_update.py
**/*.{py,md,txt,json}

📄 CodeRabbit inference engine (AGENTS.md)

Keep warning and info messages short and actionable, remove noisy or misleading logging, and make documentation edits concise, factual, and tied to changed behavior.

Files:

  • tests/test_windows_update.py
**

⚙️ CodeRabbit configuration file

**: IMPORTANT: Only comment on issues directly introduced by this PR's code changes.
Treat AGENTS.md as mandatory repository policy, not optional style guidance.
Flag PR changes that violate AGENTS.md even when the code is otherwise functional.
In particular, enforce architecture boundaries, dtype/device/memory rules,
interface contracts, import style, no unnecessary try/except blocks, no inline
imports, no outbound internet paths in core ComfyUI, and narrow scoped fixes.
Prefer direct findings over suggestions when a rule is violated. Only ignore
AGENTS.md when it clearly conflicts with a newer explicit maintainer instruction
in the PR.
Do NOT flag pre-existing issues in code that was merely moved, re-indented,
de-indented, or reformatted without logic changes. If code appears in the diff
only due to whitespace or structural reformatting (e.g., removing a with: block),
treat it as unchanged. Contributors should not feel obligated to address
pre-existing issues outside the scope of their contribution.

Files:

  • tests/test_windows_update.py
🧠 Learnings (1)
📚 Learning: 2026-02-21T14:01:41.482Z
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI PR: 12555
File: comfy_extras/nodes_glsl.py:719-724
Timestamp: 2026-02-21T14:01:41.482Z
Learning: In PyOpenGL, bare Python scalars can be accepted for 1-element array parameters by NumberHandler. This means you can pass an int/float directly to OpenGL texture deletion (e.g., glDeleteTextures(tex)) without wrapping in a list. Verify function-specific expectations and ensure types match what the OpenGL call expects; use explicit lists only when the API requires an array.

Applied to files:

  • tests/test_windows_update.py
🪛 ast-grep (0.45.1)
tests/test_windows_update.py

[warning] 20-20: The use of compile can be insecure
Context: compile(ast.Module(body=[function], type_ignores=[]), str(UPDATE_SCRIPT), "exec")
Note: [CWE-94] Improper Control of Generation of Code ('Code Injection').

(no-compile)


[error] 19-21: The use of exec can be insecure
Context: exec( # noqa: S102
compile(ast.Module(body=[function], type_ignores=[]), str(UPDATE_SCRIPT), "exec"), namespace
)
Note: [CWE-94] Improper Control of Generation of Code ('Code Injection').

(no-exec)

🔇 Additional comments (1)
tests/test_windows_update.py (1)

1-76: LGTM!


📝 Walkthrough

Walkthrough

Added isolated Windows updater tests for _fetch_remote. The tests verify that unsupported SSH URL errors trigger a system git fetch with the repository path, remote name, and branch refspec. They also verify that other pygit2.GitError exceptions, including authentication failures, propagate unchanged.

Merge Risk: ⚪ Minimal · up to 4a13c

This localized updater change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The tests support SSH fallback requirements, but .ci/update_windows/update.py was excluded by the !.ci/** path filter. Include .ci/update_windows/update.py in the review so the updater implementation can be verified against issue #12842.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: using system Git for SSH fetches in the Windows updater.
Description check ✅ Passed The description directly explains the fallback behavior, affected fetch paths, linked issue, and validation steps.
Out of Scope Changes check ✅ Passed The reviewable changes add Windows updater tests for SSH fallback and error propagation, which align with the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member

Closing this as part of a batch cleanup of the review queue.

This account currently has ~30 open pull requests filed over the course of a few days. Submissions at that volume — particularly ones that appear to be largely AI-generated — exceed what our review capacity can absorb, and they congest the queue rather than help maintenance of the repository.

If you'd like to contribute, please open an issue describing the problem first so a maintainer can confirm it's worth fixing, then send a single focused PR. Contributions that come through that way are welcome.


Generated by Claude Code

@github-actions github-actions Bot locked and limited conversation to collaborators Aug 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update.py: pygit2 remote.fetch() fails with SSH remotes ("unsupported URL protocol")

2 participants