kunaldevxxx commented on PR #4218:
URL: https://github.com/apache/iggy/pull/4218#issuecomment-5728660474
Thanks for the thorough review, @hubcio! All points have been addressed in
the latest commit:
1. **Loop All Enabled Client Listeners**: `validate_client_facing_address`
now loops through `self.client_listeners()`, so setting
`IGGY_TCP_ADDRESS=0.0.0.0:8090` does not silence loopback warnings for the
other three listeners (`websocket`, `quic`, `http`).
2. **Accurate Reachability Phrasing**: Changed the message to `"outside this
network namespace"`, and dropped the `0.0.0.0` suggestion when
`node.advertised_address` is set to avoid widening interfaces in host-network
scenarios.
3. **Environment Mapping**: Used
`ServerConfig::find_by_config_path(listener.key)` instead of string
reconstruction.
4. **Formatting Simplification**: Built the `hint` string once and formatted
into a single `eprintln!`.
5. **`eprintln!` Alignment**: Switched from `warn!` to `eprintln!` to match
the rest of `validators.rs`.
6. **Const Slice for CGroup Markers**: Moved the eight marker strings to
`const CONTAINER_CGROUP_MARKERS: &[&str]` with `.iter().any()`.
7. **Platform Gating**: Gated `let _ = cgroup_path;` with
`#[cfg(not(target_os = "linux"))]`.
8. **Test Coverage**:
- Added unit tests for positive Docker cgroup markers and negative host
cgroup lines.
- Updated unit tests to verify that all 4 loopback listeners warn by
default and the remaining 3 warn when TCP is bound to `0.0.0.0:8090`.
All local checks passed (`cargo fmt --all -- --check`, `cargo clippy -p
configs --all-features --all-targets -- -D warnings`, and 272 tests passed in
`cargo test -p configs`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]