Repository navigation
fix(k8s): the MCP tool k8s_logs takes no Loki URL - #2668
Merged
Merged
Conversation
Plans the change for issue 2635. The proposal records the offline probe that shows the defect, and the design records the decisions.
Refs #2635. The tests call the tool through a FastMCP client. They check the published schema, the refusal of a loopback or private loki_url, the default Loki for a call with no URL, and the option of the command.
Refs #2635. The tool published loki_url, and a model could make the client send a GET request to any path of a loopback or private host and read the answer text. The tool now publishes no URL and queries the default Loki, as the command does without --loki-url. The command keeps its option for a person.
Refs #2635. docs/TESTING.md says a CLI test uses the cli fixture and not a CliRunner that the test builds.
Owner
Author
|
Targeted tests on the rebased branch: 652 passed (tests/test_k8s_logql.py, test_mcp.py, test_fastmcp_contracts.py, test_valkey.py, test_k8s_logging_stack.py, test_http_egress.py, test_ai_gateway.py). Fail-to-pass against origin/main (exit 0). Three new tests fail on base and pass on the branch: Offline probe on origin/main: a loopback listener got GET /v1/sys/seal-status?query=... and the marker text of its answer came back in the tool error. After the change, the call fails at the argument contract and the listener sees 0 requests. |
dan-petty
marked this pull request as ready for review
October 29, 2026 15:06
dan-petty-release Bot
added a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.16.5](v0.16.4...v0.16.5) (2026-10-29) ### Bug Fixes * **ai:** name benchmark servers and models by host and port ([#2666](#2666)) ([8a08031](8a08031)), closes [#2481](#2481) * **config:** the audit-keys alert names the removal commands ([#2663](#2663)) ([3eb138d](3eb138d)), closes [#2513](#2513) * **k8s:** the MCP tool k8s_logs takes no Loki URL ([#2668](#2668)) ([39fae85](39fae85)), closes [#2635](#2635) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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 MCP tool
k8s_logspublished the optionloki_url. A model that gave it made devops-cli send a GET request to any path of any loopback or private host. The tool then returned the answer text of that host in its error or its log lines.The tool now publishes only its other options, through
_PATH_PARAM_RESTRICTIONS. It queries the default Loki, asdevops k8s logsdoes when it gets no--loki-url. A call that givesloki_urlfails at the argument contract and sends no request. The command keeps--loki-urlfor a person.The code has no
loki.urlsetting. So the tool dials the localhost default, and #2651 covers the missing setting.Change: openspec/changes/archive/2026-10-29-2635-k8s-logs-mcp-no-loki-url/
Closes #2635