Skip to content

Parallelize chroot image builds with per-image timings - #11766

Merged
lpcox merged 4 commits into
mainfrom
copilot/resolve-threat-detection-error
Nov 18, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/resolve-threat-detection-error

Conversation

@lpcox

@lpcox lpcox commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Serial container builds dominate chroot integration runtime, with little observed benefit from warm caches. This change targets build latency without changing cache scopes or test configuration.

  • Concurrent builds: Launch squid, agent, and browser-only api-proxy builds together; buffer output into per-image log groups.
  • Failure handling: Check every build and image inspection, wait before cleanup, remove failed tags, and prune once.
  • Measurement: Record per-image wall times and exit statuses. Hosted performance comparisons remain pending; image sharing and Squid compiler changes are deferred.
  • Regression coverage: Verify concurrent startup, isolated logs, unchanged cache scopes, and failure propagation.

@lpcox lpcox changed the title [WIP] Fix tooling error in threat detection engine Parallelize chroot image builds with per-image timings Nov 18, 2026
@lpcox
lpcox marked this pull request as ready for review November 18, 2026 05:32
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 05:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SIGTERM during wait can trigger cleanup before pending image logs are replayed, deleting the only copies and losing diagnostics for cancelled or timed-out builds.

1 open issue
What changed in this PR

Reduces chroot integration build latency by building images concurrently while preserving existing cache scopes and test configuration. Hosted-runner performance gains remain unmeasured.

Changes:

  • Runs squid, agent, and browser-only api-proxy builds concurrently, with grouped logs and per-image timings.
  • Collects build and inspection results, waits before failure cleanup, and prunes once.
  • Expands regression coverage for concurrency, log isolation, cache scopes, and failure propagation.
File Description
scripts/​ci/​chroot-image-cache.test.ts Verifies concurrent startup, grouped logs, timings, and failure handling.
scripts/​ci/​build-chroot-images.sh Adds parallel builds, buffered logs, timings, and coordinated cleanup.

Review effort: Max (adaptive)

# Import only today's package layers; never freeze apt/apk security updates.
cache_day=$(date -u +%F)
log_dir=$(mktemp -d)
trap 'rm -rf "$log_dir"' EXIT
@lpcox

lpcox commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

Copilot AI commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Fixed in 01771a0. The runner now signals the builder directly, and on SIGINT or SIGTERM the builder prints pending image logs before deleting them. The build, ShellCheck, and all 21 targeted tests passed.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox
lpcox merged commit db4e47d into main Nov 18, 2026
35 of 37 checks passed
@lpcox
lpcox deleted the copilot/resolve-threat-detection-error branch November 18, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Workflow Runtime Optimization] 2026-11-17 - .github/workflows/test-chroot.yml

3 participants