Merge pull request #2851 from yueguobin/fix/docker-node-create-setattr-noise

fix: suppress redundant console port setter log during Docker node create
This commit is contained in:
Jeremy Grossmann 2026-08-12 23:02:49 +02:00 committed by GitHub
commit f65d9b17c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,6 +81,15 @@ async def create_docker_node(project_id: UUID, node_data: schemas.DockerCreate)
memory=node_data.get("memory", 0),
cpus=node_data.get("cpus", 0),
)
# Pop keys already consumed by create_node above so the setattr
# fallback loop below only applies truly extra keys and does not
# re-trigger console/aux port setter logging.
for key in (
"console", "console_type", "console_resolution", "console_http_port",
"console_http_path", "aux", "aux_type", "start_command", "environment",
"adapters", "mac_address", "extra_hosts", "extra_volumes", "memory", "cpus",
):
node_data.pop(key, None)
for name, value in node_data.items():
if name != "node_id":
if hasattr(container, name) and getattr(container, name) != value: