ci: Lint that every published host port is deconflicted under the port scheme
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with verify-common.sh for the port scheme and verify.sh plus the Docker Compose files for each in-scope example. Review the existing Bazel yq and jq rules, then decide how to extract and join their data while covering short and long port syntax. Done means Bazel lint checks the listed allocation and linkage failures, exposes the allocation table, and the runtime check verifies published ports after compose starts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
#1509 / #1513 audited every example's host ports against the CI port scheme (documented in verify-common.sh) and fixed the violations found. But every fix was by hand, and nothing stops the next example reintroducing one. The scheme only works if a port is both exported in verify.sh and consumed via ${PORT_<ROLE>:-default} in compose — and that linkage is currently unenforced.
Ways it silently breaks today:
- Compose publishes a bare
NNNN:MMMMwith no${PORT_*}substitution → runs at a fixed, undeconflicted host port in CI (pre-#1513 state offilter-cc,wasm-cc,datadog-tracing,fault-injection). - Compose has
${PORT_X:-default}butverify.shnever exportsPORT_X→ the user default wins in CI, bypassing the scheme. verify.shexportsPORT_Xthat no compose file references → dead export, misleading (waslua-cluster-specifierPORT_WEB).- A new example picks a default in the wrong letter block, or one that collides with an existing example.
Proposal
Do this in Bazel, as the inputs are YAML. Use the existing yq/jq rules (@aspect_bazel_lib) rather than a standalone script, so the check runs as part of bazel test //... and lint CI with no new tooling.
Rough shape:
- A
yqtarget per example (or one glob) that converts every*/docker-compose*.y*mlto JSON and extracts.services[].ports[]into a normalised{example, service, host, container, proto}list. Must handle long syntax, short syntax, andhost_ip:host:container. - A small
genrule/sh_test(orjqtarget) that greps each*/verify.shforexport PORT_<ROLE>="${<EXAMPLE>_PORT_<ROLE>:-<ci-default>}"lines and emits them as JSON{example, role, override_var, ci_default}. - A
jqtarget that joins the two and fails (non-zero exit viajq -e/error()) on any of:- compose host side not exactly
${PORT_<ROLE>:-<default>}; - a compose
<ROLE>with no matchingverify.shexport; - a
verify.shexport with no compose consumer (dead); override_var≠ upper-cased dir name (-/_→_) +_PORT_<ROLE>;ci_defaultoutside1LLBNfor the dir's first letter;- two examples sharing a
1LLBblock, or any two exports sharing an absolute default.
- compose host side not exactly
- Examples with no
verify.sh(grpc-bridge,locality-load-balancing) are in scope: any published host port is a failure. - Expose the joined JSON as a build artefact so
bazel build //:port_allocations(or similar) prints the allocation table and free blocks per letter — replacing the hand-maintained tables in #1509/#1513.
Runtime check (secondary)
Static analysis won't see ports published via extends, override files, or network_mode: host. In verify-common.sh bring_up_example, after up, run docker compose ps --format json, collect every PublishedPort, and fail if any is not one of the exported PORT_* values. Cheap and catches anything the Bazel lint misses.
Out of scope
vrp-litmus/vrp-local— being removed.filter-cc/wasm-ccrun on a separate CI leg for build cost, not port reasons — they follow the scheme and are linted identically.
- Ngôn ngữ chính
- Shell
- Star
- 75
- Fork
- 39
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của envoyproxy/examples
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
envoyproxy/examples#1640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky example tests (tracking)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
envoyproxy/examples#1629 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci: Allocate example host ports dynamically instead of the static 1LLBN schemeCó thể làm lại được @phlax đã nhận 49 ngày trước và không có pull request nào đang mở. Đang mởenhancement
envoyproxy/examples#1516 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-transcoder sandbox: requirements for resubmissionCó thể làm lại được @phlax đã nhận 49 ngày trước và không có pull request nào đang mở. Đang mởenhancement
envoyproxy/examples#1499 · 3 bình luận · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add a `dynamic-mod-rust` example (Rust dynamic module HTTP filter)Có thể làm lại được @phlax đã nhận 65 ngày trước và không có pull request nào đang mở. Đang mởenhancement
envoyproxy/examples#1440 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của envoyproxy/examples
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/gh-aw-firewall#12415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
tldr-pages/tldr#25620 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update README: Sentieon version is now set in the conductor config, not the dxapp.json defaultĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
source:reader type:content-error
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stephrobert/blog-roadmap#251 ·