ci: Allocate example host ports dynamically instead of the static 1LLBN scheme
Los mantenedores suelen responder en 1 día
@phlax ya está trabajando en esto.
Desde el 12/10/2026.
- #1517 de @copilot-swe-agent — cerrado sin fusionar
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Supersedes the original proposal on this issue (static 1LLBN lint). After discussion, the static scheme solves the problem the hard way: the kernel already has a collision-free port allocator, and compose can use it via host port 0.
Goal
When Bazel runs every verify.sh in parallel on one Docker host, no two examples can ever publish the same host port — with no human-maintained allocation table and no per-example export PORT_*=<literal> lines.
How
Compose files already use "${PORT_PROXY:-10000}:10000"; the :-10000 stays as the user default for docs. In CI, verify-common.sh sets every PORT_* to 0 before up, Docker binds ephemeral host ports, and we read them back before any test step runs:
- Before
up:export PORT_<ROLE>=0for every role the example's compose references. - After
up:resolve_ports—docker compose config --no-interpolate --format jsonto learn${PORT_<ROLE>}→service:container_port, thendocker compose port <service> <container_port>to get the actual host port, and re-exportPORT_<ROLE>. Log each mapping so failures are debuggable. - Existing
http://localhost:${PORT_PROXY}steps work unchanged. - Delete the
export PORT_*=lines and the1LLBNcomment block from everyverify.sh/verify-common.sh.
Pre-up case
Where a port is interpolated into something other than ports: (a frontend config telling the browser where the backend is), 0 can't work because the value is needed before up. Known: cors, csrf, single-page-app. For these, pre-reserve: bind a socket on port 0, read it, close it, export it, then up. Small race; acceptable. Ideally the same resolve_ports code path handles both by detecting whether a role is referenced outside ports:.
Guardrails (keep — these are what actually guarantee nothing is exposed undeconflicted)
- Bazel lint (
yq→jq): every composeports:host side must be exactly${PORT_<ROLE>:-<default>}. A bareNNNN:MMMMcannot be made ephemeral and must fail. Covers all*/docker-compose*.y*ml, including examples with noverify.sh. - Runtime backstop in
bring_up_example: afterup,docker compose ps --format json; anyPublishedPortnot produced byresolve_ports→ fail. Catchesextends, override files,network_mode: host.
Validation
Prove it before committing: branch that flips verify-common.sh and runs the full verify_examples.sh matrix. Expect everything to pass except the pre-up examples until pre-reservation is added. Also confirm docker compose port behaves with 0-published ports on the compose version CI uses.
Base
Start from #1513 (normalised PORT_* names, removed stray publications, ${PORT_*}-templated filter-cc/wasm-cc) — it's the right base even though its literal defaults will be deleted.
Out of scope
vrp-litmus/vrp-local— being removed.
- Lenguaje dominante
- Shell
- Estrellas
- 75
- Forks
- 39
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 31
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de envoyproxy/examples
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
envoyproxy/examples#1640 ·
Los mantenedores suelen responder en 1 día
-
Flaky example tests (tracking)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
envoyproxy/examples#1629 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
envoyproxy/examples#1515 ·
Los mantenedores suelen responder en 1 día
-
ai-transcoder sandbox: requirements for resubmissionQuizá libre de nuevo @phlax la tomó hace 49 días y no hay ningún pull request abierto. Abiertoenhancement
envoyproxy/examples#1499 · 3 comentarios · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Add a `dynamic-mod-rust` example (Rust dynamic module HTTP filter)Quizá libre de nuevo @phlax la tomó hace 65 días y no hay ningún pull request abierto. Abiertoenhancement
envoyproxy/examples#1440 · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
Todos los issues de envoyproxy/examples
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/gh-aw-firewall#12415 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
tldr-pages/tldr#25620 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Update README: Sentieon version is now set in the conductor config, not the dxapp.json defaultAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
source:reader type:content-error
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
stephrobert/blog-roadmap#251 ·