fix: send relative image path to remote compute nodes

When creating a node on a remote compute, the controller now sends
only the image filename instead of the absolute local path. The remote
compute will search for the image in its own configured images_directories.

If the image is not found, the compute returns ImageMissingError, which
triggers the controller's automatic image upload mechanism.

This fixes issue #2676 where remote computes reject paths from the
controller due to mismatched directory prefixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
YueGuobin 2026-05-03 17:44:47 +08:00
parent c45f6d9416
commit 11fb5de84e
No known key found for this signature in database

View File

@ -539,6 +539,12 @@ class Node:
del data[k]
del self._properties[k] # We send the file only one time
data["name"] = self._name
# For remote computes, convert absolute image paths to relative paths
# The remote compute will search for the image in its own configured directories
if self._compute.id != "local" and "path" in data and os.path.isabs(data["path"]):
data["path"] = os.path.basename(data["path"])
if self._console:
# console is optional for builtin nodes
data["console"] = self._console