Skip to content

Commit f588abd

Browse files
rlmelvinclaude
andcommitted
fix: use direct aiweb_common imports, cap JRE heap, update compose
- Change `from llm_utils.aiweb_common` to `from aiweb_common` so imports work both locally (via PYTHONPATH) and in Docker (pip install) - Cap PlantUML JRE heap at 256MB (-Xmx256m) to prevent runaway memory - Add PYTHONUNBUFFERED and UMLBOT_PLANTUML_JAR_PATH to compose environment, remove .env file reference - Verified: rendering works in Docker container, 66 tests pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3601b4b commit f588abd

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

UMLBot/diagram_handlers/uml_draft_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def escape_curly_braces(val: Optional[str]) -> Optional[str]:
6161
return val.replace("{", "{{").replace("}", "}}")
6262

6363

64-
from llm_utils.aiweb_common.WorkflowHandler import WorkflowHandler
64+
from aiweb_common.WorkflowHandler import WorkflowHandler
6565
from UMLBot.config.config import UMLBotConfig
6666

6767

UMLBot/services/diagram_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def _render_plantuml_jar(
300300
jar_path = UMLBotConfig.PLANTUML_JAR_PATH
301301
try:
302302
proc = subprocess.run(
303-
["java", "-jar", jar_path, "-tpng", "-pipe"],
303+
["java", "-Xmx256m", "-jar", jar_path, "-tpng", "-pipe"],
304304
input=plantuml_code.encode("utf-8"),
305305
capture_output=True,
306306
timeout=30,

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
services:
22
umlbot:
33
build: .
4-
env_file:
5-
- .env
4+
environment:
5+
PYTHONUNBUFFERED: 1
6+
UMLBOT_PLANTUML_JAR_PATH: /opt/plantuml/plantuml.jar
67
ports:
78
- "8000:8000"
89
healthcheck:

tests/test_generic_error_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
import pytest
7-
from llm_utils.aiweb_common.generate.GenericErrorHandler import GenericErrorHandler
7+
from aiweb_common.generate.GenericErrorHandler import GenericErrorHandler
88

99

1010
def test_successful_operation():

tests/test_integration_chat_uml_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from unittest.mock import Mock
1212
from UMLBot.diagram_handlers.uml_draft_handler import UMLDraftHandler
1313
from UMLBot.config.config import UMLBotConfig
14-
from llm_utils.aiweb_common.generate.GenericErrorHandler import GenericErrorHandler
14+
from aiweb_common.generate.GenericErrorHandler import GenericErrorHandler
1515

1616

1717
class DummyPrompt:

0 commit comments

Comments
 (0)