Skip to content

feat(builds): fail fast with builder_unavailable when the build machine is off - #432

Draft
PiquelChips wants to merge 1 commit into
feat/builds-remote-builderfrom
feat/builds-builder-unavailable
Draft

PiquelChips wants to merge 1 commit into
feat/builds-remote-builderfrom
feat/builds-builder-unavailable

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

When the build machine (#428) is off, a deployment that has to build waited about 20 seconds for Buildx, then failed with git_build_failed, which points at the repository rather than the machine.

Before each build, the host now checks that the build machine's BuildKit daemon accepts a connection, for up to 5 seconds. When it doesn't, build.unavailable decides:

  • fail, the default: the deployment fails with builder_unavailable. Its guidance names the build machine, the CLI suggests env reconcile, and the build's output names the daemon it couldn't reach. It counts as a build failure for notifications.
  • local: the image builds on the host's Docker Engine instead, and the build's output says so.

Deployments that need no build never check: restores, promotions, drift repair, and deployments that reuse their images (#425).

The setting is in config.toml, the NixOS module (with an assertion that it needs build.builder), the example configuration, the references, and the dashboard's Host settings.

Narrower than the issue

  • Only the BuildKit daemon is checked, not the registry. The engine pulls from the registry, not piqueld, and the two can reach the network differently: on the development instance, piqueld couldn't reach the registry its engine pulled from without trouble. A registry the engine can't reach still fails the pull, as before.
  • A restore whose image is gone still fails with image_unavailable, not the new code.
  • Nothing retries a failed deployment when the build machine returns: the next push, a deploy or env reconcile does.

Testing

  • Unit tests for the setting and for the connection check against a listening and a closed port.
  • End to end on a development instance, with a BuildKit daemon and a registry: with the builder up, the image came from the registry; with it stopped, fail failed the deployment with builder_unavailable while the service kept running, and local built on the host.
  • cargo nextest for piqueld, piquelctl, piqueld-client and piqueld-core, Clippy for the workspace and the browser target, just openapi-check, just docs.

Stacked on #428. Closes #406. Part of #403.

Note

Written by Claude Fable 5.2 and Claude Opus 5.5 in Claude Code (via T3 Code)

🤖 Generated with Claude Code

@PiquelChips PiquelChips added the enhancement New feature or request label Nov 10, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in origin-src.dev Nov 10, 2026
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…ne is off

Before each build, the host checks that the build machine's BuildKit
daemon accepts a connection. When it doesn't, the deployment fails with
builder_unavailable, or, with build.unavailable = "local", builds on the
host instead.

Closes #406.
@PiquelChips
PiquelChips force-pushed the feat/builds-builder-unavailable branch from d973b22 to 9c2ad10 Compare November 13, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

feat(builds): handle an unreachable builder

1 participant