Blender 5.1.2 #1

Merged
stilobique merged 21 commits from Blender-5.1.2 into main 2026-07-31 10:57:39 +02:00
Showing only changes of commit d57e2ac46c - Show all commits
+15 -9
View File
@@ -148,26 +148,28 @@ class BlenderDocker:
logger = self._get_logger('test')
container_name = f"Blender-Docker-Testing-{self._blender_version.tag_name_slugify()}"
command = ['./blender', '--version']
container = None
try:
print(f'Testing your Blender Docker image {self._docker_image_name}')
logger.info(f'Testing image "{self._docker_image_name}" in container "{container_name}" '
f'with command: {" ".join(command)}')
test = self._docker_client.containers.run(
# auto_remove is intentionally NOT used: Docker can remove the container
# right after it exits, racing with the logs() call below and turning a
# real container-side error into an unrelated 409 "dead or marked for
# removal" API error. We remove the container ourselves once logs are read.
container = self._docker_client.containers.run(
name=container_name,
image=self._docker_image_name,
command=command,
auto_remove=True,
remove=True,
detach=True,
stdout=True,
stderr=True,
stream=True,
)
result = test.wait()
result = container.wait()
exit_code = result.get('StatusCode')
container_logs = test.logs(stdout=True, stderr=True).decode('utf-8', errors='replace').strip()
container_logs = container.logs(stdout=True, stderr=True).decode('utf-8', errors='replace').strip()
for raw_line in container_logs.split('\n'):
line = _clean_log_line(raw_line)
if line:
@@ -194,11 +196,15 @@ class BlenderDocker:
except APIError as e:
logger.exception(f'API error while testing "{self._docker_image_name}": {e}')
print(f'API error: {e}')
for line in e.build_log:
if 'stream' in line:
print(line['stream'].strip())
exit(1)
finally:
if container is not None:
try:
container.remove(force=True)
except APIError:
pass
def push(self):
self._docker_client.images.push(
repository=self._repository,