Report the build's own error and refuse daemons too old for BuildKit (closes #234)
Check / check (pull_request) Skipped

A build whose output ends in Docker's error line now fails with that
error, instead of going on to inspect a tag that was never created. The
build output is written to the deployment log before the failure is
recorded, so the log ends in order. Before building, upaas compares the
daemon's API version with 1.39 (Docker Engine 18.09), the first that
builds with BuildKit without experimental mode, and fails the deploy on
an older daemon instead of letting it use the legacy builder. The
README's Compose section gives the update command and the Docker Engine
versions builds need.

Model: opus-5-5
This commit is contained in:
2026-09-29 10:24:19 +00:00
parent 211e2a4a5a
commit 974da37149
7 changed files with 233 additions and 4 deletions
+4 -1
View File
@@ -923,7 +923,6 @@ func (svc *Service) buildImage(
// Create log writer that flushes build output to deployment logs every second
logWriter := newDeploymentLogWriter(ctx, deployment)
defer logWriter.Close()
// BuildImage creates a tar archive from the local filesystem,
// so it needs the container path where files exist, not the host path.
@@ -933,6 +932,10 @@ func (svc *Service) buildImage(
Tags: []string{imageTag},
LogWriter: logWriter,
})
// Write the rest of the build output to the log before the result.
logWriter.Close()
if err != nil {
svc.notify.NotifyBuildFailed(ctx, app, deployment, err)
svc.failDeployment(