ci: build and test warp on every push - #26
Merged
Merged
Conversation
warp had no CI. This adds the same build-and-test job the other urnetwork Go repos run, so a push or PR compiles every package and runs the real test suite rather than nothing. warp requires no urnetwork module and carries no `replace ../` directives, so unlike sdk, connect, server and proxy this needs no sibling checkouts. A lone checkout builds. The comment on the test step names the two families of tests that skip themselves here, so a green check is not mistaken for full coverage: the NGINX integration tests want the pinned build from `make nginx_local` in warp/lb, and warpctl/dynamo's AWS test is parked as XTestClient, which `go test` never collects. Verified locally against 7c93c47 with Go 1.27.0 (what `go-version: stable` resolves to today): `go build ./...` clean, and `go test -count=1 ./...` green across all nine packages in ~10s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MAXFxG1EK4jTxQ1iW73BUr
The first run of this workflow went red, and the cause was an assumption in
the previous commit that CI just disproved: that warp's nginx tests would
skip on a runner. One of them does not.
TestNginxLogsOmitClientAddr guards only on exec.LookPath("nginx")
(nginx_test.go:236) and assumes whatever it finds can do `stream`. Its two
siblings guard properly -- warpctl/config_test.go:420 and
lb/nginx_proxy_protocol_test.go:51 look for the pinned binary and check its
version, and both skipped cleanly. But the ubuntu-latest image ships nginx,
so this one ran, and the Ubuntu package builds stream as a DYNAMIC module
while the standalone nginx.conf the test writes has no load_module line:
nginx: [emerg] unknown directive "stream" in .../nginx.conf:19
Building the repo's own pinned nginx does not rescue it. `make nginx_local`
in warp/lb configures --without-http_rewrite_module, and the test's config
uses `return`, so that binary fails it too:
nginx: [emerg] "return" directive is not allowed here in .../nginx.conf:15
and the same build lacks --with-http_ssl_module, which turns warpctl's
TestNginxConfigValidation from a clean skip into a failure on
`ssl_protocols`. Verified locally: the pinned 1.31.4 builds in ~5s with no
extra packages, and installing it takes warp from one failing test to two.
There is no available nginx that makes this suite green.
So the test moves into its own continue-on-error step, the way connect's
workflow already treats its extender suite: still run, still visible in the
log, not gating. Everything else -- all nine packages -- is green.
The real fix belongs in the repo, and the step's comment says so: give this
test the same guard as its siblings, and widen `make nginx_local` to cover
what these tests actually use (stream, rewrite, http_ssl).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MAXFxG1EK4jTxQ1iW73BUr
Follow-up on the same workflow. Five additions, all verified against a clean
ubuntu:24.04 before pushing:
concurrency + timeout-minutes
The job had neither, so a busy branch stacked runs and a hung job would
have sat on GitHub's 6h default. server/test.yml and linux/build.yml both
set these; this now matches them. 20 minutes against a ~4 minute job.
cross-compile linux/arm64, darwin/amd64, darwin/arm64
warpctl, lb and config-updater each ship linux/{amd64,arm64} and
darwin/{amd64,arm64} from their Makefiles, and grafana both linux arches.
The native amd64 build never compiles supervise_darwin.go at all, so a
darwin break was invisible here until someone ran warpctl on a mac.
Compile-only, ~8s, nothing kept or published.
-race on the gating test run
The repo's own test.sh runs with it, and supervise.go is a process
supervisor -- goroutines, signals and health-check timers are most of
what these tests cover, and they are exactly the failures a plain run
misses. Checked for flake first, since the supervisor tests are timing
sensitive: clean over repeat runs, including on a CPU-throttled 2-core
box with GOMAXPROCS oversubscribed. Adds ~10s.
go vet ./... (non-blocking)
vet fails on a fresh checkout of main for a reason unrelated to nginx:
warpctl/cloudwatchlogs/client.go:98 is a `return nil` after a
`for { select { ... } }` with no break, so it is unreachable. One dead
line, and no other package has a finding -- but vet reports a
dependency's diagnostic against every importer, so warpctl cannot be
vetted around it. Reported, not gating, with the one-line fix named in
the comment.
Still build-and-test only: no release, no images, no signing, no publishing,
no secrets.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MAXFxG1EK4jTxQ1iW73BUr
Ryanmello07
marked this pull request as ready for review
August 22, 2026 05:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
warp is one of the urnetwork repos with no CI of its own. This adds the first one: a push, a PR against
main, or a manual dispatch now compiles every package and runs the real test suite.What it runs
On
ubuntu-latest, withactions/checkout@v4andactions/setup-go@v5atgo-version: stable— the same shape and the same pinning as the existingsdkandconnectworkflows — bounded bytimeout-minutes: 20and acancel-in-progressconcurrency group, the way the newerserverandlinuxworkflows are:go build ./...linux/arm64,darwin/amd64,darwin/arm64go test -count=1 -race -timeout 20m -skip 'TestNginxLogsOmitClientAddr' ./...go vet ./..., non-blockingWhole job is about 4 minutes.
No sibling checkouts
warp requires no urnetwork module and carries no
replace ../directives. It does not need the sibling-clone dance thatsdk,connect,serverandproxydo — a lone checkout builds. That makes this the simplest of the four Go CI PRs in this set.The one thing to review:
TestNginxLogsOmitClientAddris split out as non-blockingThe first run of this workflow went red, and it found a real problem rather than a problem with the workflow. Worth reading before approving.
TestNginxLogsOmitClientAddrguards only onexec.LookPath("nginx")(nginx_test.go:236) and assumes whatever it finds can dostream. Its two siblings guard properly —warpctl/config_test.go:420andlb/nginx_proxy_protocol_test.go:51look for the pinned binary and check its version, and both skipped cleanly on CI. But theubuntu-latestimage ships nginx, so this one ran. The Ubuntu package buildsstreamas a dynamic module, and the standalonenginx.confthe test writes has noload_moduleline:Installing the repo's own pinned nginx does not fix it — it makes CI worse.
make nginx_localinwarp/lbbuilds 1.31.4 in about 5s with no extra packages (verified locally), but it configures--without-http_rewrite_module, and the test's config usesreturn:and the same build has no
--with-http_ssl_module, which turnswarpctl'sTestNginxConfigValidationfrom a clean skip into a second failure onssl_protocols. The full matrix, all measured:streamreturn(rewrite)ssl_protocolsubuntu-latestdistro packageTestNginxLogsOmitClientAddrfailsmake nginx_localpinned 1.31.4TestNginxConfigValidationfailsThere is no available nginx that makes this suite green. So the test goes into its own
continue-on-error: truestep — still run, still visible in the log, not gating — the wayconnect's workflow already treats itsextendersuite.The real fix belongs in the repo, and the step's comment says so: give this test the same guard as its siblings (require the pinned binary, or check
nginx -Vfor--with-streambefore running), and widenmake nginx_localto cover what these tests actually use —stream,rewriteandhttp_ssl. Remove the quarantine step once that lands.Also skipped, and not pretending otherwise
warpctl/dynamo's client test needs real AWS credentials and is parked asXTestClient, whichgo testnever collects. That is the repo's own decision, not something this workflow disables. No secret is referenced anywhere in this workflow.Everything else is green
Nine packages, ~25s with the race detector on, covering
warpctlconfig and run, the nginx log scrubber unit tests, supervise, services, grafana push/stats/alerting and the loki client:Verified against
678b25a(currentmain) both locally with Go 1.27.0 and on a realubuntu-latestrunner.actionlintis clean on the file.Second pass: bounding, cross-compiles,
-race, and a second pre-existing failureFour additions after the first green run, each verified end-to-end on a clean
ubuntu:24.04before pushing.concurrency+timeout-minutes. The job had neither, so a busy branch stacked runs and a hung job would have sat on GitHub's 6h default. Nowcancel-in-progressand a 20 minute bound against a ~4 minute job, matchingserver/test.ymlandlinux/build.yml.Cross-compiling the platforms this repo actually ships.
warpctl,lbandconfig-updatereach buildlinux/{amd64,arm64}anddarwin/{amd64,arm64}from their Makefiles;grafanabuilds both linux arches. The native amd64 build never compilessupervise_darwin.goat all, so a darwin break was invisible here until someone ranwarpctlon a mac. Compile-only, ~8s, nothing kept or published.-raceon the gating run. The repo's owntest.shruns with it, andsupervise.gois a process supervisor — goroutines, signal handling and health-check timers are most of whatsupervise_test.goand thewarpctltests cover, and they are exactly the failures a plain run misses. Since those tests are timing sensitive, this was checked for flake before proposing it: clean over repeat runs, including on a CPU-throttled 2-core box withGOMAXPROCSoversubscribed. Costs ~10s.go vet ./...— a second pre-existing failure, unrelated to nginx. vet is red on a fresh checkout ofmain:That line is a
return nilsitting after afor { select { ... } }with nobreak. It is one dead line and no other package has a finding — but vet reports a dependency's diagnostic against every package that imports it, sowarpctlcannot be vetted around it. Filtering it out the wayconnect/test.ymlfilters itsextenderpackage would drop the largest package in the repo out of vet entirely, which would be worse than not gating. So vet runscontinue-on-error: true, reported but not gating.This one is a genuinely trivial fix — delete that single line and the step can drop
continue-on-errorand become a real gate. It is deliberately not fixed in this PR, which touches nothing but.github/.What a maintainer should decide
-race? It is the repo's owntest.shhabit and it is where supervisor bugs actually show up, but it is the one addition that could in principle flake on a bad runner day. Drop the flag if you would rather have the quieter signal.make nginx_local's configure flags (see above).One correction to a commit message
The first commit's body says "verified locally against 7c93c47". That SHA is wrong — the verification base is
678b25a. This repo'sDefaultruleset blocks both deletion and non-fast-forward on~ALLbranches, so it could not be amended after the first push. Noting it here rather than leaving it uncorrected.Draft: opened alongside the equivalent PRs for
glog,proxyandgoidenticonsso they can be reviewed as one set.