Repository navigation
fix(cleanup): purge dead endpoints and add skip markers - #805
Conversation
📝 WalkthroughWalkthroughThese changes update Kafka port mapping from 29092 to 19092, centralize the LLM endpoint health topic constant, refactor LLM endpoint configuration to be environment-driven, skip vision SLO tests conditionally, and remove outdated comments. Most changes involve infrastructure configuration and code organization. Changes
Poem
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docker/docker-compose.e2e.yml`:
- Line 112: The advertised Kafka external address is using the container port
(29092) while the host mapping uses the KAFKA_PORT variable; change the
advertised listener to use the same host port variable so clients receive a
reachable address. Replace the hardcoded "localhost:29092" value in the Kafka
advertised listeners/advertised.listeners or KAFKA_ADVERTISED_LISTENERS setting
with "localhost:${KAFKA_PORT:-19092}" (matching the port mapping
"${KAFKA_PORT:-19092}:29092") so the advertised external port aligns with the
host port mapping.
In `@tests/redeploy/test_pipeline_smoke.sh`:
- Line 124: The env assignment using bash -c with nested quoting for
KAFKA_BOOTSTRAP_SERVERS is triggering SC2027; replace the "bash -c" wrapper and
inline environment assignment (the KAFKA_BOOTSTRAP_SERVERS=... token) by using
the env prefix (exporting the variable for the command) rather than nested
quotes, and ensure you append "2>&1" to the command invocation so stderr is
redirected into stdout for check_output; update the line that sets
KAFKA_BOOTSTRAP_SERVERS and any other similar env assignments to follow this
pattern.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: de9f8c9b-ed76-4808-a261-91812582d3ee
⛔ Files ignored due to path filters (1)
src/omnibase_infra/enums/generated/enum_omnibase_infra_topic.pyis excluded by!**/generated/**
📒 Files selected for processing (8)
docker/docker-compose.e2e.ymlsrc/omnibase_infra/event_bus/topic_constants.pysrc/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.pysrc/omnibase_infra/services/service_llm_endpoint_health.pytests/performance/test_llm_endpoint_slo.pytests/redeploy/test_pipeline_smoke.shtests/redeploy/test_preflight.shtests/unit/nodes/node_llm_embedding_effect/handlers/test_handler_embedding_ollama.py
…e (OMN-4840) Move TOPIC_LLM_ENDPOINT_HEALTH from a local string in service_llm_endpoint_health.py to event_bus/topic_constants.py and import it, fixing the Arch Invariants raw-topic-literal check. Regenerate topic enums to stay in sync.
e887eca to
e058078
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
tests/redeploy/test_pipeline_smoke.sh (1)
122-128:⚠️ Potential issue | 🟡 MinorNested quoting issue in
bash -cblock (previously flagged).The double quotes around
${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092}on line 124 break out of the outerbash -c "..."string, causing the variable to be expanded by the outer shell rather than inside the subshell. This triggers Shellcheck SC2027 and can cause issues if the variable contains spaces or special characters.The previous review already suggested refactoring to use
envinstead ofbash -cfor cleaner variable passing:🔧 Suggested fix using `env`
check_output "Issue4: bus tunnel check skippable (no PREFLIGHT FAILED)" "PREFLIGHT OK: ENABLE_ENV_SYNC_PROBE" \ - bash -c " - OMNI_HOME='/tmp' \ - KAFKA_BOOTSTRAP_SERVERS="${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092}" \ - POSTGRES_PASSWORD='test' \ - ENABLE_ENV_SYNC_PROBE='true' \ - bash '${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check 2>&1 - " + env \ + OMNI_HOME="/tmp" \ + KAFKA_BOOTSTRAP_SERVERS="${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092}" \ + POSTGRES_PASSWORD="test" \ + ENABLE_ENV_SYNC_PROBE="true" \ + bash "${REPO_ROOT}/scripts/preflight-check.sh" --skip-tunnel-check 2>&1,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/redeploy/test_pipeline_smoke.sh` around lines 122 - 128, The current bash -c block expands ${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092} in the outer shell due to nested quoting; replace the bash -c approach with an env-based invocation so environment variables are passed safely into the subshell when calling the preflight script (invoke env to set OMNI_HOME, KAFKA_BOOTSTRAP_SERVERS, POSTGRES_PASSWORD, ENABLE_ENV_SYNC_PROBE and then run bash '${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check), ensuring variable expansion happens inside the executed process and avoiding nested-quote issues flagged by ShellCheck SC2027.
🧹 Nitpick comments (1)
src/omnibase_infra/services/service_llm_endpoint_health.py (1)
210-214: Verify if the hardcoded IP in the docstring should be updated.The PR objective OMN-4843 mentions removing stale
192.168.86.200historical references. While this is a docstring example (not runtime code), having a decommissioned IP in documentation may cause confusion. Consider updating the example to use a placeholder likehttp://llm-embedding.local:8100or referencing the environment variable pattern.📝 Suggested docstring update
config = ModelLlmEndpointHealthConfig( endpoints={ "coder-14b": "http://192.168.86.201:8000", - "qwen-embedding": os.getenv("LLM_EMBEDDING_URL", "http://192.168.86.200:8100"), + "qwen-embedding": os.getenv("LLM_EMBEDDING_URL", "http://localhost:8100"), }, probe_interval_seconds=30.0, )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/omnibase_infra/services/service_llm_endpoint_health.py` around lines 210 - 214, The docstring/example in the ModelLlmEndpointHealthConfig endpoints mapping contains stale hardcoded IPs (e.g., "http://192.168.86.201:8000" and the historical "192.168.86.200") which can confuse readers; update the example to use a neutral placeholder or environment-variable pattern (for example "http://llm-coder.local:8000" and "http://llm-embedding.local:8100" or reference os.getenv usage) so the entry for "coder-14b" and "qwen-embedding" shows a non-decommissioned, clearly-example URL or the env var pattern instead of the old 192.168.86.* addresses.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@tests/redeploy/test_pipeline_smoke.sh`:
- Around line 122-128: The current bash -c block expands
${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092} in the outer shell due to nested
quoting; replace the bash -c approach with an env-based invocation so
environment variables are passed safely into the subshell when calling the
preflight script (invoke env to set OMNI_HOME, KAFKA_BOOTSTRAP_SERVERS,
POSTGRES_PASSWORD, ENABLE_ENV_SYNC_PROBE and then run bash
'${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check), ensuring
variable expansion happens inside the executed process and avoiding nested-quote
issues flagged by ShellCheck SC2027.
---
Nitpick comments:
In `@src/omnibase_infra/services/service_llm_endpoint_health.py`:
- Around line 210-214: The docstring/example in the ModelLlmEndpointHealthConfig
endpoints mapping contains stale hardcoded IPs (e.g.,
"http://192.168.86.201:8000" and the historical "192.168.86.200") which can
confuse readers; update the example to use a neutral placeholder or
environment-variable pattern (for example "http://llm-coder.local:8000" and
"http://llm-embedding.local:8100" or reference os.getenv usage) so the entry for
"coder-14b" and "qwen-embedding" shows a non-decommissioned, clearly-example URL
or the env var pattern instead of the old 192.168.86.* addresses.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cb37024c-2c75-405f-9c9b-075ec33313cd
⛔ Files ignored due to path filters (1)
src/omnibase_infra/enums/generated/enum_omnibase_infra_topic.pyis excluded by!**/generated/**
📒 Files selected for processing (7)
docker/docker-compose.e2e.ymlsrc/omnibase_infra/event_bus/topic_constants.pysrc/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.pysrc/omnibase_infra/services/service_llm_endpoint_health.pytests/performance/test_llm_endpoint_slo.pytests/redeploy/test_pipeline_smoke.shtests/redeploy/test_preflight.sh
✅ Files skipped from review due to trivial changes (1)
- src/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py
🚧 Files skipped from review as they are similar to previous changes (2)
- docker/docker-compose.e2e.yml
- tests/performance/test_llm_endpoint_slo.py
Summary
Test Plan
grep -rn "29092" tests/redeploy/ docker/docker-compose.e2e.ymlreturns zero (except Redpanda advertise-addr which is expected)grep -n "qwen-72b" src/returns zeropre-commit run --all-filespassesPart of Epic: OMN-4829 (Ollama / Dead-Endpoint Purge)
Summary by CodeRabbit
New Features
Improvements
Chores