Merge pull request #2762 from yueguobin/fix/docker-container-rename

Fix unnecessary Docker container recreation when renaming a project
This commit is contained in:
Jeremy Grossmann 2026-06-02 09:34:11 +02:00 committed by GitHub
commit 5ab05fb688
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,9 +197,11 @@ class Project:
self.emit_controller_notification("project.updated", self.asdict())
self.dump()
# update on computes
for compute in list(self._project_created_on_compute):
await compute.put(f"/projects/{self._id}", {"variables": self.variables})
# Only notify computes if variables actually changed and have content
# None and empty list are semantically equivalent (no variables) and don't affect running nodes
if "variables" in kwargs and kwargs["variables"]:
for compute in list(self._project_created_on_compute):
await compute.put(f"/projects/{self._id}", {"variables": self.variables})
def reset(self):
"""