Skip to content

feat(pipeline): expose run logs through the CLI - #188

Merged
aparragithub merged 3 commits into
mainfrom
feat/delivery-automation
Aug 8, 2026
Merged

feat(pipeline): expose run logs through the CLI#188
aparragithub merged 3 commits into
mainfrom
feat/delivery-automation

Conversation

@aparragithub

@aparragithub aparragithub commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Closes #187

Summary

  • expose the existing provider-neutral pipeline logs capability through pipeline-logs --run-id
  • preserve multiline and empty log output without provider-specific formatting
  • cover registration, validation, provider failures, token non-disclosure, and trigger/status regressions

Changes

File Change
src/odoo_forge_cli/commands/pipeline.py Add and register the provider-neutral pipeline-logs command.
tests/cli/test_pipeline.py Add focused CLI behavior, error, security, and regression coverage.

Test plan

  • uv run pytest tests/cli/test_pipeline.py — 20 passed
  • uv run ruff check src/odoo_forge_cli/commands/pipeline.py tests/cli/test_pipeline.py
  • uv run mypy src/odoo_forge_cli/commands/pipeline.py tests/cli/test_pipeline.py
  • Changed production file has 100% line and branch coverage
  • Gentle AI reliability review completed with no findings

Contributor checklist

  • Linked approved issue Expose pipeline run logs through the CLI #187
  • Exactly one type:* label will be applied
  • Tests and static checks pass
  • Documentation is not required for this bounded CLI completion slice
  • Conventional commit used
  • No AI attribution or co-author trailers

Summary by CodeRabbit

  • New Features

    • Added the pipeline-logs command to retrieve and display logs for a pipeline run.
    • Supports multiline and empty log output while preserving the original formatting.
    • Requires a run ID and provides clear feedback for missing or invalid requests.
    • Log retrieval is available through the main command-line application.
  • Security

    • Authentication tokens are excluded from displayed log output.

@aparragithub aparragithub added the type:feature New feature label Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8d2e41c2-01de-45a8-ad17-5472aee042ca

📥 Commits

Reviewing files that changed from the base of the PR and between 21bd300 and 7b089bc.

📒 Files selected for processing (1)
  • tests/cli/test_pipeline.py
💤 Files with no reviewable changes (1)
  • tests/cli/test_pipeline.py

📝 Walkthrough

Walkthrough

The pipeline CLI now provides pipeline-logs --run-id to retrieve and print provider logs. Tests cover output, provider errors, token non-disclosure, command registration, and required-option validation.

Changes

Pipeline log retrieval

Layer / File(s) Summary
Add and register pipeline logs command
src/odoo_forge_cli/commands/pipeline.py
Adds the logs command, forwards the run ID through PipelineRunRef, prints returned logs, and handles supported errors. Registers the command as pipeline-logs.
Validate log output and error behavior
tests/cli/test_pipeline.py
Tests multiline and empty output, provider calls, supported failures, token non-disclosure, root help exposure, and missing --run-id validation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant CLI
  participant PipelineProvider
  Operator->>CLI: Provide --run-id
  CLI->>PipelineProvider: Call logs with PipelineRunRef
  PipelineProvider-->>CLI: Return log text or supported error
  CLI-->>Operator: Print logs or CLI error
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the CLI feature that exposes pipeline run logs.
Linked Issues check ✅ Passed The changes implement #187 by adding registration, validation, log forwarding, output handling, error handling, and focused tests.
Out of Scope Changes check ✅ Passed The changes stay within the CLI presentation boundary and focused tests; no providers, adapters, orchestration, or workflows changed.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/delivery-automation

Comment @coderabbitai help to get the list of available commands.

@aparragithub
aparragithub merged commit adf748a into main Aug 8, 2026
5 checks passed
@aparragithub
aparragithub deleted the feat/delivery-automation branch August 9, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose pipeline run logs through the CLI

1 participant