comfygit-deploy 0.3.4__tar.gz → 0.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/PKG-INFO +2 -2
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/worker.py +8 -2
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/pyproject.toml +2 -2
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_worker_commands.py +54 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/.gitignore +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/README.md +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/cli.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/custom.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/dev.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/instances.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/commands/runpod.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/config.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/providers/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/providers/custom.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/providers/runpod.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/startup/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/startup/scripts.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/worker/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/worker/mdns.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/worker/native_manager.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/worker/server.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/comfygit_deploy/worker/state.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/__init__.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/conftest.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_cli.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_config.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_custom_client.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_logs_streaming.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_mdns.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_mdns_scanner.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_native_manager.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_runpod_client.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_startup_script.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_unified_instances.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_worker_server.py +0 -0
- {comfygit_deploy-0.3.4 → comfygit_deploy-0.3.6}/tests/test_worker_state.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfygit-deploy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: ComfyGit Deploy - Remote deployment and worker management CLI
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: aiohttp>=3.9.0
|
|
7
|
-
Requires-Dist: comfygit==0.3.
|
|
7
|
+
Requires-Dist: comfygit==0.3.6
|
|
8
8
|
Requires-Dist: zeroconf>=0.131.0
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
|
|
@@ -112,6 +112,13 @@ def handle_up(args: argparse.Namespace) -> int:
|
|
|
112
112
|
print("Worker not configured. Run 'cg-deploy worker setup' first.")
|
|
113
113
|
return 1
|
|
114
114
|
|
|
115
|
+
# Use COMFYGIT_HOME if set, otherwise fall back to config
|
|
116
|
+
workspace = get_validated_workspace()
|
|
117
|
+
if not workspace:
|
|
118
|
+
print("No valid workspace found.")
|
|
119
|
+
print("Set COMFYGIT_HOME or run 'cg-deploy worker setup --workspace /path'")
|
|
120
|
+
return 1
|
|
121
|
+
|
|
115
122
|
# Parse port range
|
|
116
123
|
port_range = args.port_range.split(":")
|
|
117
124
|
port_start = int(port_range[0])
|
|
@@ -136,7 +143,6 @@ def handle_up(args: argparse.Namespace) -> int:
|
|
|
136
143
|
if dev_manager:
|
|
137
144
|
dev_manager = str(Path(dev_manager).resolve())
|
|
138
145
|
# Symlink manager to system_nodes
|
|
139
|
-
workspace = Path(config["workspace_path"])
|
|
140
146
|
system_nodes = workspace / ".metadata" / "system_nodes"
|
|
141
147
|
system_nodes.mkdir(parents=True, exist_ok=True)
|
|
142
148
|
manager_link = system_nodes / "comfygit-manager"
|
|
@@ -163,7 +169,7 @@ def handle_up(args: argparse.Namespace) -> int:
|
|
|
163
169
|
|
|
164
170
|
app = create_worker_app(
|
|
165
171
|
api_key=config["api_key"],
|
|
166
|
-
workspace_path=
|
|
172
|
+
workspace_path=workspace,
|
|
167
173
|
default_mode=args.mode,
|
|
168
174
|
port_range_start=port_start,
|
|
169
175
|
port_range_end=port_end,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "comfygit-deploy"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.6"
|
|
4
4
|
description = "ComfyGit Deploy - Remote deployment and worker management CLI"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"comfygit==0.3.
|
|
8
|
+
"comfygit==0.3.6",
|
|
9
9
|
"aiohttp>=3.9.0",
|
|
10
10
|
"zeroconf>=0.131.0",
|
|
11
11
|
]
|
|
@@ -93,6 +93,60 @@ class TestWorkspaceValidation:
|
|
|
93
93
|
class TestWorkerCommands:
|
|
94
94
|
"""Tests for worker command handlers."""
|
|
95
95
|
|
|
96
|
+
def test_handle_up_uses_env_workspace_over_config(
|
|
97
|
+
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
98
|
+
) -> None:
|
|
99
|
+
"""handle_up should use COMFYGIT_HOME over config workspace_path.
|
|
100
|
+
|
|
101
|
+
This is the key test: when COMFYGIT_HOME is set, the worker server
|
|
102
|
+
should use that workspace, not the one saved in worker.json.
|
|
103
|
+
"""
|
|
104
|
+
config_path = tmp_path / "worker.json"
|
|
105
|
+
config_workspace = tmp_path / "config-workspace"
|
|
106
|
+
env_workspace = tmp_path / "env-workspace"
|
|
107
|
+
config_workspace.mkdir(parents=True)
|
|
108
|
+
env_workspace.mkdir(parents=True)
|
|
109
|
+
|
|
110
|
+
# Create config with one workspace
|
|
111
|
+
import json
|
|
112
|
+
config_path.write_text(json.dumps({
|
|
113
|
+
"version": "1",
|
|
114
|
+
"api_key": "cg_wk_test123",
|
|
115
|
+
"workspace_path": str(config_workspace),
|
|
116
|
+
"default_mode": "native",
|
|
117
|
+
}))
|
|
118
|
+
|
|
119
|
+
# Set env to different workspace
|
|
120
|
+
monkeypatch.setenv("COMFYGIT_HOME", str(env_workspace))
|
|
121
|
+
|
|
122
|
+
args = argparse.Namespace(
|
|
123
|
+
host="127.0.0.1",
|
|
124
|
+
port=9999,
|
|
125
|
+
mode="native",
|
|
126
|
+
broadcast=False,
|
|
127
|
+
port_range="8200:8210",
|
|
128
|
+
dev=False,
|
|
129
|
+
dev_core=None,
|
|
130
|
+
dev_manager=None,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
# Track what workspace_path is passed to create_worker_app
|
|
134
|
+
captured_workspace = None
|
|
135
|
+
|
|
136
|
+
def mock_create_app(**kwargs):
|
|
137
|
+
nonlocal captured_workspace
|
|
138
|
+
captured_workspace = kwargs.get("workspace_path")
|
|
139
|
+
# Return a mock app that we can "run"
|
|
140
|
+
return MagicMock()
|
|
141
|
+
|
|
142
|
+
with patch("comfygit_deploy.commands.worker.WORKER_CONFIG_PATH", config_path):
|
|
143
|
+
with patch("comfygit_deploy.worker.server.create_worker_app", mock_create_app):
|
|
144
|
+
with patch("aiohttp.web.run_app"): # Don't actually start server
|
|
145
|
+
worker_commands.handle_up(args)
|
|
146
|
+
|
|
147
|
+
# The workspace passed to create_worker_app should be from env, not config
|
|
148
|
+
assert captured_workspace == env_workspace
|
|
149
|
+
|
|
96
150
|
def test_handle_setup_creates_config(self, tmp_path: Path) -> None:
|
|
97
151
|
"""worker setup should create worker config."""
|
|
98
152
|
config_path = tmp_path / "worker.json"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|