Skip to content

feat: persist runner execution logs and serve history via API #5381

Draft
0vertake wants to merge 2 commits into
superplanehq:mainfrom
0vertake:feat/runner-log-history-backend
Draft

feat: persist runner execution logs and serve history via API #5381
0vertake wants to merge 2 commits into
superplanehq:mainfrom
0vertake:feat/runner-log-history-backend

Conversation

@0vertake

Copy link
Copy Markdown
Collaborator

No description provided.

@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@0vertake 0vertake marked this pull request as draft June 12, 2026 13:17

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fee5f5c. Configure here.

Environment: environment,
ExecutionMode: mode,
DockerImage: resolvedRunBashDockerImageRef(spec),
TimeoutSeconds: spec.ExecutionTimeoutSeconds,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bash runner drops upstream payload

High Severity

Run Bash now creates broker tasks with only commands and no message_chain, while JS/Python runners still send upstream data that way. Bash scripts and docs rely on SUPERPLANE_PAYLOAD_FILE being populated from that chain, so workflows reading upstream context can fail or see empty payload after this change.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fee5f5c. Configure here.

@superplane-gh-integration-9000

superplane-gh-integration-9000 Bot commented Jun 12, 2026

Copy link
Copy Markdown

Docs Impact Review

This PR adds a new public API endpoint for retrieving persisted runner execution logs, which is a meaningful new capability not mentioned anywhere in the current docs.

Suggested docs updates:

  • docs.superplane.com/concepts/runners — add a new "Execution log history" section explaining that runner node logs (stdout lines, command start/end events, errors) are automatically persisted and can be retrieved via the API at GET /api/v1/canvases/{canvas_id}/executions/{execution_id}/logs. Document the limit and after_sequence cursor-pagination parameters, and note that this endpoint is only available for runner component nodes (shell commands, bash, JavaScript, Python).

Why: The PR introduces ListNodeExecutionLogs as a new gRPC/REST endpoint (proto + authorization rule + service handler), persists structured log records from all four runner component types, and defines four distinct log entry types (line, error, cmd_start, cmd_end). The Runners concept page currently has no mention of log persistence or log retrieval; users discovering the new endpoint in Swagger would have no conceptual documentation explaining what fields to expect or how pagination works.


Maintainers: Reply with /docs-agree to open a tracking issue in superplanehq/docs (and assign it to you), or /docs-reject to dismiss this check.

Posted automatically by warp-gateway · commit 0fac001

@0vertake 0vertake force-pushed the feat/runner-log-history-backend branch from fee5f5c to a9c2142 Compare June 12, 2026 13:28
@AleksandarCole

Copy link
Copy Markdown
Collaborator

/docs-reject

Signed-off-by: Milos Jovanovic <milosjovanovic519@gmail.com>
@0vertake 0vertake force-pushed the feat/runner-log-history-backend branch from a9c2142 to 92ea4b3 Compare June 12, 2026 13:53
@@ -0,0 +1,24 @@
CREATE TABLE IF NOT EXISTS workflow_node_execution_logs (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we storing these in the database? Shouldn't we use S3?

The /api/v1/runner-logs endpoint was registered inside RegisterGRPCGateway,
which is only called when START_GRPC_GATEWAY=yes. This meant the route was
never active in deployments without gRPC gateway.

Move the route registration to InitRouter so it's always available.
The endpoint uses its own Bearer-token auth (TASK_BROKER_AUTH_TOKEN) and
does not require org context or gRPC.

Signed-off-by: Leo <leo@superplane.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants