Skip to content

fix(ci): airlock smoke test runs on PRs and binds broker to IPAddress.Any#100

Merged
GordonBeeming merged 2 commits intomainfrom
gb/airlock-smoke-on-prs
Apr 9, 2026
Merged

fix(ci): airlock smoke test runs on PRs and binds broker to IPAddress.Any#100
GordonBeeming merged 2 commits intomainfrom
gb/airlock-smoke-on-prs

Conversation

@GordonBeeming
Copy link
Copy Markdown
Owner

Summary

  • AirlockSmokeTests.cs was still binding the broker to IPAddress.Loopback, which only works on macOS / Docker Desktop / OrbStack — Linux CI runners route host.docker.internal:host-gateway to the bridge IP and a loopback-only listener can't accept connections from there. Switch to IPAddress.Any, same fix already applied to BrokerSmokeTests.
  • integration-tests-airlock was gated to main because it depended on build-proxy / build-images having pushed the canonical sha tags. Now it builds the proxy + default app images locally via dev-build.sh and runs on every PR. Catches airlock + DinD regressions at PR time instead of post-merge.

Why this matters

The current main build is failing on this exact bug — the regression slipped past PRs because the airlock smoke test only ran on main. (failing run)

Test plan

  • CI: integration-tests-airlock runs and passes on this PR
  • CI: integration-tests-broker stays green
  • CI: every other check stays green
  • Manual: 556/556 unit tests pass locally

Refs #20

….Any

Two fixes for the airlock + DinD smoke test job:

## 1. AirlockSmokeTests was binding the broker to IPAddress.Loopback

Same Linux-runner bug we hit in BrokerSmokeTests two commits ago and
fixed there. The proxy container resolves host.docker.internal via
host-gateway, which on Linux maps to the docker bridge IP (e.g.
172.17.0.1). A loopback-only listener cannot accept connections
coming in from the bridge gateway, so socat in the proxy container
hits "EOF" trying to forward to the host broker, and the integration
test fails with:

  docker version through proxy bridge failed: stderr=error during
  connect: Get "http://proxy:2375/v1.54/version": EOF

macOS / Docker Desktop / OrbStack route loopback magically. Linux CI
runners do not. Switch the smoke broker to IPAddress.Any so it
accepts connections on every interface, same as BrokerSmokeTests.

## 2. integration-tests-airlock now runs on every PR, not just main

The previous shape depended on build-proxy + build-images having
pushed the canonical proxy-sha-<sha> and copilot-default-sha-<sha>
tags to ghcr, both of which are gated to main. So PRs were never
exercising the airlock smoke test, and bugs in the airlock + DinD
path only got caught after merge — exactly what just happened with
the IPAddress.Loopback regression.

Restructured the job to:
  * not depend on build-proxy / build-images / prepare-versions
  * run dev-build.sh inline to build the proxy + default app images
    locally with the canonical :proxy and :latest tags
  * point COPILOT_HERE_PROXY_IMAGE / COPILOT_HERE_APP_IMAGE at those
    local tags via the override env vars introduced earlier
  * drop the "if: github.ref == refs/heads/main" gate

Cost: one extra ~5 min image build per PR. Benefit: airlock + DinD
regressions get caught at PR time instead of post-merge on main.

556/556 unit tests still pass.

Refs #20

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming marked this pull request as ready for review April 9, 2026 05:01
Copilot AI review requested due to automatic review settings April 9, 2026 05:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the Airlock integration smoke test to work on Linux CI runners by binding the broker listener to IPAddress.Any, and updates CI so the full airlock + DinD smoke test can run on pull requests by building required images locally.

Changes:

  • Update AirlockSmokeTests to bind the broker TCP listener to IPAddress.Any (fixes Linux CI connectivity via host.docker.internal:host-gateway).
  • Add a PR-time integration-tests-airlock workflow job that builds proxy/default images locally via dev-build.sh and runs the airlock smoke test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/CopilotHere.IntegrationTests/AirlockSmokeTests.cs Switch broker listener from loopback to IPAddress.Any so proxy bridge can connect on Linux CI.
.github/workflows/publish.yml Adds a PR-running airlock integration test job that locally builds images before running the smoke test.

The previous commit on this branch was supposed to replace the
main-only job definition with the PR-friendly one, but the patch
restore left both definitions in the file. Two jobs with the same
name made GitHub Actions reject the workflow file before it even
queued — the publish.yml run failed without producing any jobs.

Removing the original (main-only, dependent on build-proxy /
build-images / prepare-versions) leaves just the new PR-friendly
definition that builds images locally via dev-build.sh.

Refs #20

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming merged commit ae827a4 into main Apr 9, 2026
31 checks passed
@GordonBeeming GordonBeeming deleted the gb/airlock-smoke-on-prs branch April 9, 2026 05: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.

2 participants