-
Notifications
You must be signed in to change notification settings - Fork 136
feat: live-refresh public data sources; make gallery a CQL engine #474
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
base: main
Are you sure you want to change the base?
Changes from all commits
51d131b
4720d3f
b43914c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -864,16 +864,32 @@ def categories_cmd( | |||||||||||||||
|
|
||||||||||||||||
| @app.command( | ||||||||||||||||
| "refresh", | ||||||||||||||||
| help="object_info is fetched live from the server on each command — nothing to refresh.", | ||||||||||||||||
| help="Re-fetch node annotation data (pack/labels/cloud_disabled) from Comfy-Org/comfy-complete.", | ||||||||||||||||
| ) | ||||||||||||||||
| @tracking.track_command("nodes") | ||||||||||||||||
| def refresh_cmd( | ||||||||||||||||
| where: Annotated[ | ||||||||||||||||
| str | None, | ||||||||||||||||
| typer.Option("--where", show_default=False, help="Override the resolved routing mode."), | ||||||||||||||||
| ] = None, | ||||||||||||||||
| ): | ||||||||||||||||
| """Explain that object_info is fetched live and exit.""" | ||||||||||||||||
| def refresh_cmd(): | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropping
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that was broken — fixed in 4b3b3ed. Rewrote all three references (the run hint + both SKILL.md). Took your point that refresh only touches annotations now, so they point at the real fix (re-run once reachable / check |
||||||||||||||||
| """Force-refresh the node annotation cache from the public comfy-complete repo. | ||||||||||||||||
|
|
||||||||||||||||
| ``object_info`` itself is fetched live from the server on every command, so | ||||||||||||||||
| there is nothing to refresh there. The *annotations* (which custom-node pack | ||||||||||||||||
| a node belongs to, its behavioral labels, and whether it's disabled on | ||||||||||||||||
| cloud) come from Comfy-Org/comfy-complete and are cached locally with a TTL; | ||||||||||||||||
| this command pulls the latest copy immediately. | ||||||||||||||||
| """ | ||||||||||||||||
| renderer = get_renderer() | ||||||||||||||||
| rprint("[dim]object_info is fetched live from the server on each command — nothing to refresh.[/dim]") | ||||||||||||||||
| renderer.emit({"refreshed": False, "reason": "live_fetch"}, command="nodes refresh") | ||||||||||||||||
| from comfy_cli.cql import annotations_source | ||||||||||||||||
|
|
||||||||||||||||
| results = annotations_source.refresh_annotations() | ||||||||||||||||
| ok = all(r["source"] == "remote" for r in results) | ||||||||||||||||
| if renderer.is_pretty(): | ||||||||||||||||
| for r in results: | ||||||||||||||||
| if r["source"] == "remote": | ||||||||||||||||
| rprint(f"[green]✓[/green] {r['name']} ({r['bytes']:,} bytes) → {r['path']}") | ||||||||||||||||
| elif r["source"] == "bundled": | ||||||||||||||||
| rprint( | ||||||||||||||||
| f"[yellow]![/yellow] {r['name']}: remote fetch failed, using bundled snapshot " | ||||||||||||||||
| f"([dim]{r.get('error', '')}[/dim])" | ||||||||||||||||
|
Comment on lines
+889
to
+891
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use neutral bundled-fallback wording. When Proposed wording tweak rprint(
- f"[yellow]![/yellow] {r['name']}: remote fetch failed, using bundled snapshot "
- f"([dim]{r.get('error', '')}[/dim])"
+ f"[yellow]![/yellow] {r['name']}: using bundled snapshot "
+ f"([dim]{r.get('error') or 'remote unavailable'}[/dim])"
)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 4b3b3ed — dropped the "remote fetch failed" wording, the reason field carries the why. |
||||||||||||||||
| ) | ||||||||||||||||
| else: | ||||||||||||||||
| rprint(f"[red]✗[/red] {r['name']}: unavailable ([dim]{r.get('error', '')}[/dim])") | ||||||||||||||||
| renderer.emit({"refreshed": ok, "files": results}, command="nodes refresh") | ||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment about this URL where we list all Partner Nodes?
https://api.comfy.org/openapi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — you're right. It's published at
/openapi(JSON), and/openapi.yml404s. Fixed in a224a9c:refreshnow fetches/openapiand caches it (validates it's a real spec first). Live-refresh actually works now.