[Serving] Remove config-info endpoint from metrics server - #8128
Merged
Merged
Conversation
The /config-info endpoint on the metrics server dumps the full engine config (cfg.__dict__) and all environment variables as JSON, leaking sensitive configuration and secrets. Remove the endpoint and its tests. The cache_config_info Prometheus metric is unchanged.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add /config-info absence checks for both apps and remove the now-unused metrics_url fixtures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (8)
补充两个端口上的 /config-info 404 回归检查 · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New 删除未使用的 metrics_url fixture · New
What changed in this PR
Removes the sensitive /config-info endpoint and related tests while preserving /metrics and cache_config_info.
Changes:
- Deletes the configuration-leaking endpoint and unused imports.
- Removes unit and E2E endpoint tests.
- Retains Prometheus metrics behavior.
| File | Description |
|---|---|
tests/entrypoints/openai/test_metrics_routes.py |
Removes endpoint tests; needs absence checks on both apps. |
tests/entrypoints/openai/test_api_server.py |
Removes the configuration endpoint test. |
tests/e2e/test_ernie_03b_router.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/test_ernie_03b_pd_router_v1_rdma_tp2.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/test_ernie_03b_pd_router_v1_rdma_tp1.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/test_ernie_03b_pd_router_v1_rdma_global_cache.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/test_ernie_03b_pd_router_v1_ipc.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/golang_router/test_ernie_03b_pd_golang_router_v1_rdma_tp1.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
tests/e2e/golang_router/test_ernie_03b_golang_router.py |
Removes the endpoint E2E check; unused fixture cleanup noted. |
fastdeploy/entrypoints/openai/api_server.py |
Removes the sensitive endpoint and related imports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
|
|
||
| def test_metrics_and_config_routes(): | ||
| def test_metrics_route(): |
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
| @@ -266,13 +266,6 @@ def headers(): | |||
| return {"Content-Type": "application/json"} | |||
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
| assert res.status_code == 200 | ||
|
|
||
|
|
||
| def send_request(url, payload, timeout=60): |
|
|
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.


The /config-info endpoint on the metrics server dumps the full engine config (cfg.dict) and all environment variables as JSON, leaking sensitive configuration and secrets. Remove the endpoint and its tests. The cache_config_info Prometheus metric is unchanged.