Bug: get_pipeline_logs returns empty log content for all pipelines #3

Closed
opened 2026-03-06 21:06:09 +00:00 by forgejo_admin · 0 comments
Contributor

Plan

No plan — standalone bug fix.

Repo

forgejo_admin/woodpecker-mcp

User Story

As an AI agent monitoring CI pipelines
I want to read actual log content from pipeline steps
So that I can diagnose failures without needing kubectl or the Woodpecker UI

Context

The get_pipeline_logs MCP tool returns log entries as empty newlines for ALL pipelines — both successful and failed. This was discovered while diagnosing a CI failure on pal-e-docs that had been silently broken for 7 consecutive pipelines (#111-#118). The empty logs made it impossible to see that the failure was a simple ruff format check.

The Woodpecker API returns log entries as an array of objects with fields like line, data, time, etc. The MCP tool appears to be extracting only the newlines without the actual data content.

Evidence:

  • Pipeline #117 (pal-e-docs, failure): get_pipeline_logs returns all newlines, no content
  • Pipeline #23 (pal-e-docs-mcp, success): get_pipeline_logs also returns all newlines, no content
  • Pipeline metadata (status, steps, exit codes) returns correctly — only log content is broken

File Targets

  • Wherever the log parsing/formatting happens in the MCP tool — likely in the tool that calls the Woodpecker SDK's log endpoint and formats the response

Acceptance Criteria

  • get_pipeline_logs returns actual log line content (the command output from each step)
  • Both successful and failed pipeline logs are readable
  • max_lines truncation still works

Test Expectations

  • Call get_pipeline_logs on a known successful pipeline — should see actual command output
  • Call get_pipeline_logs on a known failed pipeline — should see error output

Constraints

  • Check the Woodpecker API response format — the SDK may have changed its log schema
  • The raw API returns HTML (SPA) on the external URL — the SDK uses internal service URL

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • woodpecker-mcp project
  • bug-ci-ruff-format-migrate-script — the bug this made invisible
### Plan No plan — standalone bug fix. ### Repo `forgejo_admin/woodpecker-mcp` ### User Story As an AI agent monitoring CI pipelines I want to read actual log content from pipeline steps So that I can diagnose failures without needing kubectl or the Woodpecker UI ### Context The `get_pipeline_logs` MCP tool returns log entries as empty newlines for ALL pipelines — both successful and failed. This was discovered while diagnosing a CI failure on pal-e-docs that had been silently broken for 7 consecutive pipelines (#111-#118). The empty logs made it impossible to see that the failure was a simple `ruff format` check. The Woodpecker API returns log entries as an array of objects with fields like `line`, `data`, `time`, etc. The MCP tool appears to be extracting only the newlines without the actual `data` content. **Evidence:** - Pipeline #117 (pal-e-docs, failure): `get_pipeline_logs` returns all newlines, no content - Pipeline #23 (pal-e-docs-mcp, success): `get_pipeline_logs` also returns all newlines, no content - Pipeline metadata (status, steps, exit codes) returns correctly — only log content is broken ### File Targets - Wherever the log parsing/formatting happens in the MCP tool — likely in the tool that calls the Woodpecker SDK's log endpoint and formats the response ### Acceptance Criteria - [ ] `get_pipeline_logs` returns actual log line content (the command output from each step) - [ ] Both successful and failed pipeline logs are readable - [ ] `max_lines` truncation still works ### Test Expectations - [ ] Call `get_pipeline_logs` on a known successful pipeline — should see actual command output - [ ] Call `get_pipeline_logs` on a known failed pipeline — should see error output ### Constraints - Check the Woodpecker API response format — the SDK may have changed its log schema - The raw API returns HTML (SPA) on the external URL — the SDK uses internal service URL ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `woodpecker-mcp` project - `bug-ci-ruff-format-migrate-script` — the bug this made invisible
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/woodpecker-mcp#3
No description provided.