ci: validate compose-profile entries on the self-hosted box, one at a time - #1190
Merged
Conversation
… time
validate (fulmine) has been failing on three profiles for reasons that have
nothing to do with the entry. The gateway and production compose files pin
cpusets from the benchmark host - 0-15,64-79 for the edge, 17-20,81-84 for
authsvc, 21-31,85-95 for the server - and a GitHub runner has four cores, so
docker refuses to create the containers. Every gateway-subscribed entry has
this: aspnet-minimal_caddy, aspnet-minimal_nginx, fulmine, sark-gateway,
sark-production, trillium, trillium-tuned.
Unsetting the cpusets on the runner would have let the containers start, but
the stack would then be unpinned and contending for four cores with the load
generator. That is not the profile being validated. These belong on the box
that has the cores.
detect now emits two lists. An entry that ships a compose.*.yml goes to
`validate-gateway` on self-hosted; everything else keeps running in parallel on
ubuntu-latest exactly as before. The split is per entry rather than per profile
because validate.sh runs an entry's whole `tests` array in one process, so a
gateway-subscribed entry has to run its isolated profiles there too.
Serialization, since the stacks bind the host's ports directly - edge 8443,
authsvc 9090, server 8080 - and two of them on one box fight over them:
- the job shares the `benchmark` concurrency group, so a validation never
runs while a measured run holds the machine, and waits rather than
replacing it
- it iterates the entries in one job instead of a matrix. A matrix job enters
the concurrency group once per entry, and GitHub keeps only one run pending
per group, so three gateway entries in one PR would have the third cancel
the second while it waited. One job holding the slot for all of them is
sequential by construction.
Every entry runs even if an earlier one fails, so a PR touching several gets
one report rather than one failure and a blank.
Also drops two entries the old detection would have tried to validate: a
directory deleted in the PR, and frameworks/_shared, which is the authsvc
sidecar rather than an entry and has no meta.json. Both used to reach
validate.sh and fail there.
Verified the detection against the real tree for six cases: a single gateway
entry, a mixed PR, plain entries only, frameworks/_shared, a deleted
framework, and a PR that touches no entry at all.
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.
validate (fulmine)has been failing on three profiles for reasons that have nothing to do with the entry.The gateway and production compose files pin cpusets from the benchmark host —
0-15,64-79for the edge,17-20,81-84for authsvc,21-31,85-95for the server. A GitHub runner has four cores, so Docker refuses to create the containers. Every gateway-subscribed entry has this today:aspnet-minimal_caddy·aspnet-minimal_nginx·fulmine·sark-gateway·sark-production·trillium·trillium-tunedUnsetting the cpusets on the runner would have let the containers start, but the stack would then be unpinned and contending for four cores with the load generator. That isn't the profile being validated. These belong on the box that has the cores.
The split
detectnow emits two lists. An entry that ships acompose.*.ymlgoes tovalidate-gatewayonself-hosted; everything else keeps running in parallel onubuntu-latestexactly as before.Per entry, not per profile —
validate.shruns an entry's wholetestsarray in one process, so a gateway-subscribed entry has to run its isolated profiles on the same box.Serialization
The stacks bind the host's ports directly (edge 8443, authsvc 9090, server 8080), so two of them on one machine fight over them — which is exactly what took production-stack down in #1182.
benchmarkconcurrency group, so a validation never runs while a measured run holds the box, and queues rather than replacing it (cancel-in-progress: false, matching the benchmark workflows)Every entry runs even if an earlier one fails, so a PR touching several gets one report instead of one failure and a blank.
Incidental
Two things the old detection would have tried to validate and doesn't any more: a framework directory deleted in the PR, and
frameworks/_shared— the authsvc sidecar, not an entry, with nometa.json. Both used to reachvalidate.shand fail there.Verified
Detection run against the real tree for six cases: a single gateway entry (the fulmine PR), a mixed PR, plain entries only,
frameworks/_shared, a deleted framework, and a PR touching no entry at all.Pairs with #1189, which stops a stale stack from another entry holding those ports in the first place.
🤖 Generated with Claude Code