refactor: remove Tool Configs and Config Folders
These features are fully superseded by Config Profiles which provide: - Env vars, file mounts, port overrides, start commands, working dirs - Git mounts, profile composition, cycle detection - Default selection, project/tool-type scoping Changes: - Delete backend models: ToolConfig, ConfigFolder - Delete backend APIs: tool_configs.py, config_folders.py - Delete frontend API clients: tool_configs.ts, config_folders.ts - Remove Tool Config fetching from start_instance, use ConfigProfile only - Simplify merge_with_config to accept only profile (no tool_configs) - Remove configs/folders tabs from Tool Workshop page - Delete associated integration and unit tests - Add Alembic migration to drop tool_configs and config_folders tables Quality gates: backend tests 59 passed, frontend typecheck clean
This commit is contained in:
@@ -351,13 +351,12 @@ def compute_image_tag(tool_name: str, manifest: dict) -> str:
|
||||
|
||||
|
||||
def merge_with_config(
|
||||
manifest: dict, tool_configs: list[dict], profile: dict | None = None
|
||||
manifest: dict, profile: dict | None = None
|
||||
) -> dict:
|
||||
"""Merge ToolConfig and ConfigProfile overrides into a manifest.
|
||||
"""Merge ConfigProfile overrides into a manifest.
|
||||
|
||||
Args:
|
||||
manifest: Base manifest from tool definition.
|
||||
tool_configs: List of ToolConfig records.
|
||||
profile: Resolved ConfigProfile (optional).
|
||||
|
||||
Returns:
|
||||
@@ -365,29 +364,9 @@ def merge_with_config(
|
||||
"""
|
||||
result = deepcopy(manifest)
|
||||
|
||||
# Apply ToolConfigs
|
||||
extra_env: dict[str, str] = {}
|
||||
extra_volumes: list[dict] = []
|
||||
|
||||
for config in tool_configs:
|
||||
if config.get("config_type") == "env":
|
||||
extra_env[config["key"]] = config["value"]
|
||||
elif config.get("config_type") == "file" and config.get("file_path"):
|
||||
# Files are handled outside the manifest (written to instance dir)
|
||||
pass
|
||||
if config.get("port_override"):
|
||||
result["default_port"] = config["port_override"]
|
||||
if config.get("start_command"):
|
||||
result["runtime"] = result.get("runtime", {})
|
||||
result["runtime"]["command"] = config["start_command"].split()
|
||||
if config.get("working_directory"):
|
||||
result["runtime"] = result.get("runtime", {})
|
||||
result["runtime"]["working_dir"] = config["working_directory"]
|
||||
if config.get("environment_variables"):
|
||||
extra_env.update(config["environment_variables"])
|
||||
if config.get("volumes"):
|
||||
extra_volumes.extend(config["volumes"])
|
||||
|
||||
# Apply ConfigProfile
|
||||
if profile:
|
||||
if profile.get("environment_variables"):
|
||||
|
||||
Reference in New Issue
Block a user